Class Zend_Config_Xml

Description

XML Adapter for Zend_Config

  • copyright: Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Config/Xml.php (line 35)

Zend_Config
   |
   --Zend_Config_Xml
Class Constant Summary
 XML_NAMESPACE = 'http://framework.zend.com/xml/zend-config-xml/1.0/'
Variable Summary
 boolean $_skipExtends
Method Summary
 Zend_Config_Xml __construct (string $xml, [mixed $section = null], [boolean $options = false])
 array _arrayMergeRecursive (mixed $firstArray, mixed $secondArray)
 array _processExtends ( $element, string $section, [ $config = array()])
 array|string _toArray ( $xmlObject)
Variables
Methods
Constructor __construct (line 68)

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".

  • throws: Zend_Config_Exception When section $sectionName cannot be found in $xml
  • throws: Zend_Config_Exception When xml is not set or cannot be loaded
  • access: public
Zend_Config_Xml __construct (string $xml, [mixed $section = null], [boolean $options = false])
  • string $xml: XML file or string to process
  • mixed $section: Section to process
  • boolean $options: Whether modifiacations are allowed at runtime

Redefinition of:
Zend_Config::__construct()
Zend_Config provides a property based interface to an array. The data are read-only unless $allowModifications is set to true on construction.
_arrayMergeRecursive (line 295)

Merge two arrays recursively, overwriting keys of the same name in $firstArray with the value in $secondArray.

  • access: protected
array _arrayMergeRecursive (mixed $firstArray, mixed $secondArray)
  • mixed $firstArray: First array
  • mixed $secondArray: Second array to merge into first array
_processExtends (line 148)

Helper function to process each element in the section and handle the "extends" inheritance attribute.

  • throws: Zend_Config_Exception When $section cannot be found
  • access: protected
array _processExtends ( $element, string $section, [ $config = array()])
  • SimpleXMLElement $element: XML Element to process
  • string $section: Section to process
  • array $config: Configuration which was parsed yet
_toArray (line 179)

Returns a string or an associative and possibly multidimensional array from a SimpleXMLElement.

  • access: protected
array|string _toArray ( $xmlObject)
  • SimpleXMLElement $xmlObject: Convert a SimpleXMLElement into an array

Inherited Methods

Inherited From Zend_Config

 Zend_Config::__construct()
 Zend_Config::areAllSectionsLoaded()
 Zend_Config::count()
 Zend_Config::current()
 Zend_Config::get()
 Zend_Config::getExtends()
 Zend_Config::getSectionName()
 Zend_Config::key()
 Zend_Config::merge()
 Zend_Config::next()
 Zend_Config::readOnly()
 Zend_Config::rewind()
 Zend_Config::setExtend()
 Zend_Config::setReadOnly()
 Zend_Config::toArray()
 Zend_Config::valid()
 Zend_Config::_assertValidExtend()
 Zend_Config::_loadFileErrorHandler()
 Zend_Config::__clone()
 Zend_Config::__get()
 Zend_Config::__isset()
 Zend_Config::__set()
 Zend_Config::__unset()
Class Constants
XML_NAMESPACE = 'http://framework.zend.com/xml/zend-config-xml/1.0/' (line 40)

XML namespace for ZF-related tags and attributes

Documentation generated on Thu, 01 Apr 2010 13:29:16 -0400 by phpDocumentor 1.4.3