private function PhpDumper::hasReference

Checks if a service id has a reference

Parameters

string $id:

array $arguments:

Return value

Boolean

3 calls to PhpDumper::hasReference()
PhpDumper::addServiceInlinedDefinitions in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Generates the inline definition of a service.
PhpDumper::addServiceInlinedDefinitionsSetup in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Generates the inline definition setup.
PhpDumper::isSimpleInstance in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Checks if the definition is a simple instance.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php, line 963

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function hasReference($id, array $arguments) {
  foreach ($arguments as $argument) {
    if (is_array($argument)) {
      if ($this
        ->hasReference($id, $argument)) {
        return true;
      }
    }
    elseif ($argument instanceof Reference) {
      if ($id === (string) $argument) {
        return true;
      }
    }
  }
  return false;
}