You are here

private function PhpDumper::getDefinitionsFromArguments in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::getDefinitionsFromArguments()

Gets the definition from arguments.

Parameters

array $arguments:

Return value

array

1 call to PhpDumper::getDefinitionsFromArguments()
PhpDumper::getInlinedDefinitions in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Returns the inline definition.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php, line 1213

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function getDefinitionsFromArguments(array $arguments) {
  $definitions = array();
  foreach ($arguments as $argument) {
    if (is_array($argument)) {
      $definitions = array_merge($definitions, $this
        ->getDefinitionsFromArguments($argument));
    }
    elseif ($argument instanceof Definition) {
      $definitions = array_merge($definitions, $this
        ->getInlinedDefinitions($argument), array(
        $argument,
      ));
    }
  }
  return $definitions;
}