|
| __construct ($xml, $section=null, $options=false) |
| Loads the section $section from the config file (or string $xml for access facilitated by nested object properties.
|
|
| __construct (array $array, $allowModifications=false) |
| Zend_Config provides a property based interface to an array.
|
|
| get ($name, $default=null) |
| Retrieve a value and return $default if there is no element set.
|
|
| __get ($name) |
| Magic function so that $obj->value will work.
|
|
| __set ($name, $value) |
| Only allow setting of a property if $allowModifications was set to true on construction.
|
|
| __clone () |
| Deep clone of this instance to ensure that nested Zend_Configs are also cloned.
|
|
| toArray () |
| Return an associative array of the stored data.
|
|
| __isset ($name) |
| Support isset() overloading on PHP 5.1.
|
|
| __unset ($name) |
| Support unset() overloading on PHP 5.1.
|
|
| count () |
| Defined by Countable interface.
|
|
| current () |
| Defined by Iterator interface.
|
|
| key () |
| Defined by Iterator interface.
|
|
| next () |
| Defined by Iterator interface.
|
|
| rewind () |
| Defined by Iterator interface.
|
|
| valid () |
| Defined by Iterator interface.
|
|
| getSectionName () |
| Returns the section name(s) loaded.
|
|
| areAllSectionsLoaded () |
| Returns true if all sections were loaded.
|
|
| merge (Zend_Config $merge) |
| Merge another Zend_Config with this one.
|
|
| setReadOnly () |
| Prevent any more modifications being made to this instance.
|
|
| readOnly () |
| Returns if this Zend_Config object is read only or not.
|
|
| getExtends () |
| Get the current extends.
|
|
| setExtend ($extendingSection, $extendedSection=null) |
| Set an extend for Zend_Config_Writer.
|
|
| _loadFileErrorHandler ($errno, $errstr, $errfile, $errline) |
| Handle any errors from simplexml_load_file or parse_ini_file.
|
|
|
| _processExtends (SimpleXMLElement $element, $section, array $config=array()) |
| Helper function to process each element in the section and handle the "extends" inheritance attribute.
|
|
| _toArray (SimpleXMLElement $xmlObject) |
| Returns a string or an associative and possibly multidimensional array from a SimpleXMLElement.
|
|
| _assertValidExtend ($extendingSection, $extendedSection) |
| Throws an exception if $extendingSection may not extend $extendedSection, and tracks the section extension if it is valid.
|
|
| _arrayMergeRecursive ($firstArray, $secondArray) |
| Merge two arrays recursively, overwriting keys of the same name in $firstArray with the value in $secondArray.
|
|
__construct |
( |
|
$xml, |
|
|
|
$section = null , |
|
|
|
$options = false |
|
) |
| |
Loads the section $section from the config file (or string $xml for access facilitated by nested object properties.
Sections are defined in the XML as children of the root element.
In order to extend another section, a section defines the "extends" attribute having a value of the section name from which the extending section inherits values.
Note that the keys in $section will override any keys of the same name in the sections that have been included via "extends".
The $options parameter may be provided as either a boolean or an array. If provided as a boolean, this sets the $allowModifications option of Zend_Config. If provided as an array, there are two configuration directives that may be set. For example:
$options = array( 'allowModifications' => false, 'skipExtends' => false );
- Parameters
-
string | $xml | XML file or string to process |
mixed | $section | Section to process |
array | boolean | $options | |
- Exceptions
-