XML Adapter for Zend_Config
category | Zend |
---|---|
package | Zend_Config |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Config |
__clone() : void
__construct(string $xml, mixed $section= null
, array|boolean $options= false
)
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 );
inherited_from | \Zend_Config::__construct() |
---|
string
XML file or string to process
mixed
Section to process
array
boolean
\Zend_Config_Exception |
When xml is not set or cannot be loaded |
---|---|
\Zend_Config_Exception |
When section $sectionName cannot be found in $xml |
__construct(array $array, boolean $allowModifications = false
) : void
Zend_Config also implements Countable and Iterator to facilitate easy access to the data.
array
boolean
__get(string $name) : mixed
string
mixed
__isset(string $name) : boolean
string
boolean
__set(string $name, mixed $value) : void
string
mixed
\Zend_Config_Exception |
---|
__unset(string $name) : void
string
\Zend_Config_Exception |
---|
_loadFileErrorHandler(integer $errno, string $errstr, string $errfile, integer $errline)
integer
string
string
integer
areAllSectionsLoaded() : boolean
boolean
count() : integer
integer
current() : mixed
mixed
get(string $name, mixed $default = null
) : mixed
string
mixed
mixed
getExtends() : array
array
getSectionName() : mixed
mixed
key() : mixed
mixed
merge(\Zend_Config $merge) : \Zend_Config
\Zend_Config
\Zend_Config
next()
readOnly() : boolean
boolean
rewind()
setExtend(string $extendingSection, string $extendedSection = null
) : void
string
string
setReadOnly()
toArray() : array
array
valid() : boolean
boolean
_arrayMergeRecursive(mixed $firstArray, mixed $secondArray) : array
mixed
First array
mixed
Second array to merge into first array
array
_assertValidExtend(string $extendingSection, string $extendedSection) : void
string
string
\Zend_Config_Exception |
---|
_processExtends(\SimpleXMLElement $element, string $section, array $config = array()
) : array
\SimpleXMLElement
XML Element to process
string
Section to process
array
Configuration which was parsed yet
\Zend_Config_Exception |
When $section cannot be found |
---|
array
_toArray(\SimpleXMLElement $xmlObject) : array | string
\SimpleXMLElement
Convert a SimpleXMLElement into an array
array
string
$_allowModifications : boolean
$_count : integer
$_data : array
$_extends : array
array()
$_index : integer
$_loadFileErrorStr : string
null
Is null if there was no error while file loading
$_loadedSection : mixed
$_skipExtends : boolean
false
$_skipNextIteration : boolean
XML_NAMESPACE = 'http://framework.zend.com/xml/zend-config-xml/1.0/'