You are here

public function Container::initialized in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/dependency-injection/Container.php \Symfony\Component\DependencyInjection\Container::initialized()
  2. 8 core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container::initialized()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Container.php \Symfony\Component\DependencyInjection\Container::initialized()

Returns true if the given service has actually been initialized.

Parameters

string $id The service identifier:

Return value

bool true if service has already been initialized, false otherwise

Overrides IntrospectableContainerInterface::initialized

File

vendor/symfony/dependency-injection/Container.php, line 333

Class

Container
Container is a dependency injection container.

Namespace

Symfony\Component\DependencyInjection

Code

public function initialized($id) {
  $id = strtolower($id);
  if ('service_container' === $id) {

    // BC: 'service_container' was a synthetic service previously.
    // @todo Change to false in next major release.
    return true;
  }
  if (isset($this->aliases[$id])) {
    $id = $this->aliases[$id];
  }
  return isset($this->services[$id]) || array_key_exists($id, $this->services);
}