Finds all edges belonging to a specific service id.
string $id The service id used to find edges:
array $arguments An array of arguments:
Boolean $required:
string $name:
array An array of edges
private function findEdges($id, $arguments, $required, $name) {
$edges = array();
foreach ($arguments as $argument) {
if (is_object($argument) && $argument instanceof Parameter) {
$argument = $this->container
->hasParameter($argument) ? $this->container
->getParameter($argument) : null;
}
elseif (is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) {
$argument = $this->container
->hasParameter($match[1]) ? $this->container
->getParameter($match[1]) : null;
}
if ($argument instanceof Reference) {
if (!$this->container
->has((string) $argument)) {
$this->nodes[(string) $argument] = array(
'name' => $name,
'required' => $required,
'class' => '',
'attributes' => $this->options['node.missing'],
);
}
$edges[] = array(
'name' => $name,
'required' => $required,
'to' => $argument,
);
}
elseif (is_array($argument)) {
$edges = array_merge($edges, $this
->findEdges($id, $argument, $required, $name));
}
}
return $edges;
}