Skip to content

Instantly share code, notes, and snippets.

View Rendez's full-sized avatar

Luis Merino Rendez

View GitHub Profile
@Rendez
Rendez / gist:763008
Created January 3, 2011 01:24
route.xml
<route name="..." output_types="html xslt email">
@Rendez
Rendez / static_files.xsd
Created January 3, 2011 01:00
parts/static_files.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:routing_1_0="http://agavi.org/agavi/config/parts/routing/1.0"
xmlns="http://domain.com/config/parts/static_files/1.0"
targetNamespace="http://domain.com/config/parts/static_files/1.0"
elementFormDefault="qualified">
<xs:import namespace="http://agavi.org/agavi/config/parts/routing/1.0"
schemaLocation="../../../../../libs/agavi/config/xsd/parts/routing.xsd" />
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:routing_1_0="http://agavi.org/agavi/config/parts/routing/1.0"
xmlns="http://domain.com/config/parts/static_files/1.0"
targetNamespace="http://domain.com/config/parts/static_files/1.0"
elementFormDefault="qualified">
<xs:import namespace="http://agavi.org/agavi/config/parts/routing/1.0"
schemaLocation="../../../../../libs/agavi/config/xsd/parts/routing.xsd" />
<?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"
<autoload name="StaticFilesConfigHandler">%core.lib_dir%/config/StaticFilesConfigHandler.class.php</autoload>
<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>
<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>
<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>
<?php
/**
* @package StaticFiles
*
* @author Luis Merino <[email protected]>
* @copyright Author
*/
class StaticFilesConfigHandler extends AgaviXmlConfigHandler
{
const XML_NAMESPACE = 'http://company.com/projectname/config/parts/static_files/1.0';