Processes a ContainerBuilder object to populate the service reference graph.
ContainerBuilder $container:
Overrides CompilerPassInterface::process
public function process(ContainerBuilder $container) {
$this->container = $container;
$this->graph = $container
->getCompiler()
->getServiceReferenceGraph();
$this->graph
->clear();
foreach ($container
->getDefinitions() as $id => $definition) {
if ($definition
->isSynthetic() || $definition
->isAbstract()) {
continue;
}
$this->currentId = $id;
$this->currentDefinition = $definition;
$this
->processArguments($definition
->getArguments());
if (!$this->onlyConstructorArguments) {
$this
->processArguments($definition
->getMethodCalls());
$this
->processArguments($definition
->getProperties());
if ($definition
->getConfigurator()) {
$this
->processArguments(array(
$definition
->getConfigurator(),
));
}
}
}
foreach ($container
->getAliases() as $id => $alias) {
$this->graph
->connect($id, $alias, (string) $alias, $this
->getDefinition((string) $alias), null);
}
}