function Container::has
Same name in this branch
- 11.1.x core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container::has()
Overrides ContainerInterface::has
3 calls to Container::has()
- Container::getEnv in vendor/
symfony/ dependency-injection/ Container.php - Fetches a variable from the environment.
- ContainerBuilder::has in vendor/
symfony/ dependency-injection/ ContainerBuilder.php - Returns true if the container can return an entry for the given identifier. Returns false otherwise.
- ContainerBuilder::has in vendor/
symfony/ dependency-injection/ ContainerBuilder.php - Returns true if the container can return an entry for the given identifier. Returns false otherwise.
1 method overrides Container::has()
- ContainerBuilder::has in vendor/
symfony/ dependency-injection/ ContainerBuilder.php - Returns true if the container can return an entry for the given identifier. Returns false otherwise.
File
-
vendor/
symfony/ dependency-injection/ Container.php, line 176
Class
- Container
- Container is a dependency injection container.
Namespace
Symfony\Component\DependencyInjectionCode
public function has(string $id) : bool {
if (isset($this->aliases[$id])) {
$id = $this->aliases[$id];
}
if (isset($this->services[$id])) {
return true;
}
if ('service_container' === $id) {
return true;
}
return isset($this->fileMap[$id]) || isset($this->methodMap[$id]);
}