nervetattoo / aether

Modular PHP framework
aether-project.com
11 stars 1 forks source link

Aether

A modular PHP framework

aether.comfig.xml example

   <config>
       <site name="www.foo.com">
           <urlRules>
               <!-- Matches http://www.foo.com/foo -->
               <rule name="foo">
                   <module provides="header">Header</module>
                   <template>Header.tpl</template>
                   <option name="title">Foo.com/Foo</option>
               </rule>

               <!-- Index -->
               <rule match="">
                   <template>Index.tpl</template>
               </rule>

               <!-- Everything that isn't catched with a <rule> is run here, e.g. 404's -->
               <rule default="true">
                   <module>Status404</module>
                   <template>404.tpl</template>
               </rule>
           </urlRules>
       </site>
   </config>

The config elements

       <site name="dev.foo.com>(...)</site>
       <site name="*">(...)</site>
       <rule match="foo" store="path">(...)</rule>
       <rule pattern="/^(.+)$/" store="path">(...)</rule>
       <template>foo.tpl</template>
       <template>dir/foo.tpl</template>
       <import>globals.xml</import>
       <module provides="header" cache="60">Header</module>
       <module provides="header" cache="60">dir/Header</module>
       <module>Header</module>

Magic options

       <option name="searchpath">/path/to/aether</option>
       <option name="searchpath">/path/to/aether;/path/to/aether2</option>
       <option name="cacheOptions">localhost:11211</option>