Finds all nodes.
array An array of all nodes
private function findNodes() {
$nodes = array();
$container = clone $this->container;
foreach ($container
->getDefinitions() as $id => $definition) {
$nodes[$id] = array(
'class' => str_replace('\\', '\\\\', $this->container
->getParameterBag()
->resolveValue($definition
->getClass())),
'attributes' => array_merge($this->options['node.definition'], array(
'style' => ContainerInterface::SCOPE_PROTOTYPE !== $definition
->getScope() ? 'filled' : 'dotted',
)),
);
$container
->setDefinition($id, new Definition('stdClass'));
}
foreach ($container
->getServiceIds() as $id) {
$service = $container
->get($id);
if (in_array($id, array_keys($container
->getAliases()))) {
continue;
}
if (!$container
->hasDefinition($id)) {
$nodes[$id] = array(
'class' => str_replace('\\', '\\\\', get_class($service)),
'attributes' => $this->options['node.instance'],
);
}
}
return $nodes;
}