<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| This file is part of the Agavi package. |
| Copyright (c) 2006 the Agavi Project. |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| AGAVI CONFIGURATION HANDLER CONFIGURATION |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| CATEGORIES: |
| |
| A category name must exist in the form of the configuration file base |
| name, which is the name of the file without the path, or must exist with a |
| relative path to the configuration file. If a category exists with a |
| relative path, the path itself is relative to the "core.app_dir" Agavi |
| application setting. |
| |
| In theory, you can have the two following categories: config.ini and |
| modules/MyModule/config/config.ini. However, a category with a path that |
| matches the requested configuration file exactly takes precedence over a |
| category with just the base name. |
| |
| NOTES: |
| |
| 1. A category with an absolute filesystem path should never exist unless a |
| configuration file that is used within the application exists outside |
| of both "core.agavi_dir" and "core.app_dir" Agavi application settings. |
| |
| 2. Registered handlers with a parameter list should be registered with a |
| relative path so the parameters do not get carried over to another |
| configuration file with the same base name. |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| REQUIRED KEYS: |
| |
| |
| <handlers> Parent element for <handler> |
| Includes: |
| 1-n <handler> elements |
| |
| <handler> Defines a configuration handler |
| Attributes: |
| pattern : file path pattern |
| Includes: |
| <class> element |
| optional parameters |
| |
| <class> The implementation for this configuration handler |
| Attributes: |
| file : The filesystem path to the class file. If the path is relative, |
| it will be relative to the "core.app_dir" Agavi application |
| setting. |
| Includes : |
| The class name providing the custom implementation. |
| |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| PARAMETERS: |
| |
| <parameters> element specifies a group of parameters to be passed to the |
| initialization method of the class instance. Parameters can either be |
| simple name and value pairs but also nested groups of parameters. Nested |
| parameters can also be named and they can be nested infinitely. |
| |
| Any number of parameters can be passed but it's of course up to the |
| receiving end what parameters are expected. |
| |
| Example: |
| |
| <parameters> |
| <parameter name="param1">value1</parameter> |
| <parameter name="param2"> |
| <parameters> |
| <parameter name="subfoo1">value2</parameter> |
| <parameter name="subfoo2"> |
| <parameters> |
| <parameter>first</parameter> |
| <parameter>second</parameter> |
| </parameters> |
| </parameter> |
| </parameters> |
| </parameter> |
| </parameters> |
| |
| For a list of available parameters for a class, browse the class source |
| or documentation. |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| KEYWORDS: |
| You may reference any configuration directive by enclosing the name in |
| "%" signs. Example: %core.agavi_dir% |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
-->
<configurations parent="%core.system_config_dir%/config_handlers.xml">
<!--
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Register your custom configuration handlers here. Or register an existing |
| handler with a new filename! Registering handlers does not slow down the |
| application because they are only loaded when a configuration file needs |
| to be recompiled into a cache file. To be safe, you should register them |
| with a relative path associated so they don't get confused with somebody |
| elses module configuration files with the same base name. |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
<configuration environment="development">
<handlers>
<handler pattern="%core.module_dir%/CoolModule/config/cool.xml">
<class file="%core.module_dir%/CoolModule/lib/CoolConfigurationHandler.class.php">CoolConfigHandler</class>
<parameters>
<parameter name="title">Cool Module</parameter>
</parameters>
</handler>
</handlers>
</configuration>
old method:
<handler pattern="%core.system_config_dir%/ths_settings.xml">
<class file="%core.app_dir%/lib/ConfigDirectivesConfigHandler.class.php">ConfigDirectivesConfigHandler</class>
<parameters>
<parameter name="title">THS Settings</parameter>
</parameters>
</handler>
-->
<configuration>
<handlers>
<handler pattern="%core.config_dir%/ths_settings.xml" class="ConfigDirectivesConfigHandler" />
</handlers>
</configuration>
</configurations>