You are here

public function ContainerBuilder::has in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::has()

Returns true if the given service is defined.

Parameters

string $id The service identifier:

Return value

bool true if the service is defined, false otherwise

Overrides ContainerInterface::has

2 calls to ContainerBuilder::has()
ContainerBuilder::callMethod in vendor/symfony/dependency-injection/ContainerBuilder.php
ContainerBuilder::callMethod in core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php
A 1to1 copy of parent::callMethod.

File

vendor/symfony/dependency-injection/ContainerBuilder.php, line 405

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->aliasDefinitions[$id]) || parent::has($id);
}