public function Container::has

Returns true if the given service is defined.

@api

Parameters

string $id The service identifier:

Return value

Boolean true if the service is defined, false otherwise

Overrides ContainerInterface::has

2 calls to Container::has()
ContainerBuilder::has in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
Returns true if the given service is defined.
ProjectServiceContainer::getMethodCall1Service in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
Gets the 'method_call1' service.
1 method overrides Container::has()
ContainerBuilder::has in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
Returns true if the given service is defined.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php, line 213

Class

Container
Container is a dependency injection container.

Namespace

Symfony\Component\DependencyInjection

Code

public function has($id) {
  $id = strtolower($id);
  return isset($this->services[$id]) || method_exists($this, 'get' . strtr($id, array(
    '_' => '',
    '.' => '_',
  )) . 'Service');
}