public function ContainerBuilder::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 Container::has

1 call to ContainerBuilder::has()
ContainerBuilder::createService in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
Creates a service for a service definition.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php, line 300

Class

ContainerBuilder
ContainerBuilder is a DI container that provides an API to easily describe services.

Namespace

Symfony\Component\DependencyInjection

Code

public function has($id) {
  $id = strtolower($id);
  return isset($this->definitions[$id]) || isset($this->aliases[$id]) || parent::has($id);
}