// anonymous services are always private
// we could not use the constant false here, because of XML parsing
$services[0
]->
setAttribute('public', 'false'
);
} } } // anonymous services "in the wild"
if (false !==
$nodes =
$xpath->
query('.//container:services/container:service[not(@id)]',
$root)) { foreach ($nodes as $node) { throw new InvalidArgumentException(sprintf('Top-level services must have "id" attribute, none found in "%s" at line %d.',
$file,
$node->
getLineNo()));
} } // resolve definitions
uksort($definitions, 'strnatcmp'
);
foreach (array_reverse($definitions) as $id =>
[$domElement,
$file]) { if (null !==
$definition =
$this->
parseDefinition($domElement,
$file,
new Definition())) { $this->
setDefinition($id,
$definition);
} } }