Zend_Config_Xml::__construct
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 );
Signature
public function __construct(string
$xml,
[mixed
$section = null,
[array|boolean
$options = false]] )
Parameters
-
$xml
- XML file or string to process
-
$section
- Section to process
-
$options
Errors/Exceptions
-
Zend_Config_Exception
- When xml is not set or cannot be loaded
-
Zend_Config_Exception
- When section $sectionName cannot be found in $xml
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
78 - 146 | CyclomaticComplexity | The method __construct() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. |
78 - 146 | NPathComplexity | The method __construct() has an NPath complexity of 432. The configured NPath complexity threshold is 200. |