Legacy configuration driver that retrieves values from constants. It provides support for Core 3.1 configurations but should not be used for new projects.
=== Implementation Configuration keys are mapped to constants by taking the first key segment (the section) as the base namespace name with a fixed sub-namespace called "Configuration", followed by additional optional sub-namespaces with the same name as additional segments. Each segment name is converted to camel-case.
Per default, PHP constants are case-sensitive, unless they were defined explicitly to be case-insensitive. If constants are being used that do not fully translate to camel-case, the constant matching can be set to be case-insensitive by searching through all user-defined variables, with an accordingly increased overhead. A case-insensitive match is only performed if no case-sensitive match was found.
Requests for collections should be avoided, as those require an expensive
search through all defined user-constants. Additionally, PHP stores all
namespaces in lowercase only, hence camel-case namespaces cannot be converted
to their proper option name. Use an underscore (
"_") in the affected
namespace name instead.
As additional constants are easily registered but existing constants cannot be changed, the system configuration is not buffered.
=== Restrictions As constants cannot be overridden in PHP, setting values is unsupported.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Set\Mutable implements Core\Mutator
- Core\Field implements Core\Inquiry
- Core\Field\Mutable implements Core\Variator
Requires: PHP 5.3
Located at Configuration/Driver/constant.inc.php
Retrieves the raw value for a given key from the back-end storage.
Retrieves a configuration option as an array. If the option is the default value given are not an array, the value is converted into an array.
Methods inherited from Core\Configuration
Methods inherited from Core\Field\Mutable
Methods inherited from Core\Field
Methods inherited from Core\Object
Boolean configuration parameter. If enabled, constants are resolved case-independent. This can solve problems with mixed case names.
Constants inherited from Core\Object