public static function XmlFileLoader::convertDomElementToArray in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php \Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray()
Converts a \DomElement object to a PHP array.
The following rules applies during the conversion:
- Each tag is converted to a key value or an array if there is more than one "value"
- The content of a tag is set under a "value" key (<foo>bar</foo>) if the tag also has some nested tags
- The attributes are converted to keys (<foo foo="bar"/>)
- The nested-tags are converted to keys (<foo><foo>bar</foo></foo>)
Parameters
\DomElement $element A \DomElement instance:
Return value
array A PHP array
2 calls to XmlFileLoader::convertDomElementToArray()
- XmlFileLoader::loadFromExtensions in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Loader/ XmlFileLoader.php - Loads from an extension.
- XmlFileLoaderTest::testConvertDomElementToArray in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Loader/ XmlFileLoaderTest.php
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Loader/ XmlFileLoader.php, line 565
Class
- XmlFileLoader
- XmlFileLoader loads XML files service definitions.
Namespace
Symfony\Component\DependencyInjection\LoaderCode
public static function convertDomElementToArray(\DomElement $element) {
return XmlUtils::convertDomElementToArray($element);
}