This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retuns the native constructor of its caller | |
function $itself(){ | |
return function(){ | |
return this; | |
} | |
} | |
// Number Fix for SVG values in Gecko | |
Number.implement('svg', (Browser.Engine.gecko) ? function(){ return this + 0.001; } : $itself()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.implement('repeat', function(number, fn, bind){ | |
return function(){ | |
for (var i = 1; i <= number; i++) fn.call(this, i, number); | |
}; | |
}); | |
mySillyFunction = function(){ | |
console.log('Moo said the dog; Meow said the bird'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.append = function(){ | |
for (var i = 0, l = arguments.length; i < l; i++) { | |
$extend(this.prototype, arguments[i]); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StaticFilesConfigHandler extends AgaviXmlConfigHandler | |
{ | |
const XML_NAMESPACE = 'http://domain.com/config/parts/static_files/1.0'; | |
const VERSION_REPLACEMENT_VAR = 'timestamp'; | |
public function execute(AgaviXmlConfigDomDocument $document) | |
{ | |
// settig up our default namespace | |
$document->setDefaultNamespace(self::XML_NAMESPACE, 'static_files'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package StaticFiles | |
* | |
* @author Luis Merino <mail@luismerino.name> | |
* @copyright Author | |
*/ | |
class StaticFilesConfigHandler extends AgaviXmlConfigHandler | |
{ | |
const XML_NAMESPACE = 'http://company.com/projectname/config/parts/static_files/1.0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<settings prefix="com.domain"> | |
<xi:include href="../config/module.xml" xpointer=" | |
xmlns(http://agavi.org/agavi/config/parts/module/1.0) xpointer(//configurations/module/*)" /> | |
<settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<route name="index"> | |
<fileset metatype="style"> | |
<file name="screen">%com.domain.styles%/screen.css</file> | |
<file name="print">%com.domain.styles%/print.css</file> | |
</fileset> | |
<fileset metatype="script"> | |
<files> | |
<file name="mootools">http://code.google.com/p/mootools/mootools-1.3.js</file> | |
<file name="base">%com.domain.scripts%/base.js</file> | |
</files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<handler pattern=”%core.config_dir%/static_files.xml” class=”StaticFilesConfigHandler”> | |
<validation>%core.lib_dir%/config/xsd/static_files.xsd</validation> | |
<transformation>%core.lib_dir%/config/xsl/static_files.xsl</transformation> | |
</handler> | |
<handler pattern=”%core.module_dir%/*/config/static_files.xml” class=”StaticFilesConfigHandler”> | |
<validation>%core.lib_dir%/config/xsd/static_files.xsd</validation> | |
<transformation>%core.lib_dir%/config/xsl/static_files.xsl</transformation> | |
</handler> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<autoload name="StaticFilesConfigHandler">%core.lib_dir%/config/StaticFilesConfigHandler.class.php</autoload> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ae:configurations xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0" <-- "ae" stands for agavi envelope | |
xmlns="http://agavi.org/agavi/config/parts/routing/1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<xs:schema | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:envelope_1_0="http://agavi.org/agavi/config/global/envelope/1.0" <-- | |
xmlns:types_1_0="http://agavi.org/agavi/config/global/types/1.0" | |
xmlns="http://agavi.org/agavi/config/parts/routing/1.0" |
OlderNewer