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()
1 method overrides Container::has()

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');
}