You are here

private function XmlFileLoader::getChildren in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php \Symfony\Component\DependencyInjection\Loader\XmlFileLoader::getChildren()

Get child elements by name.

Parameters

\DOMNode $node:

mixed $name:

Return value

array

4 calls to XmlFileLoader::getChildren()
XmlFileLoader::getArgumentsAsPhp in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
Returns arguments as valid php types.
XmlFileLoader::parseDefinition in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
Parses an individual Definition.
XmlFileLoader::parseParameters in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
Parses parameters.
XmlFileLoader::processAnonymousServices in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
Processes anonymous services.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php, line 412

Class

XmlFileLoader
XmlFileLoader loads XML files service definitions.

Namespace

Symfony\Component\DependencyInjection\Loader

Code

private function getChildren(\DOMNode $node, $name) {
  $children = array();
  foreach ($node->childNodes as $child) {
    if ($child instanceof \DOMElement && $child->localName === $name && $child->namespaceURI === self::NS) {
      $children[] = $child;
    }
  }
  return $children;
}