class ExceptionContainer
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
- 8.9.x core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
- 11.x core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
Base container which throws an exception.
Hierarchy
- class \Drupal\Component\DependencyInjection\Container implements \Drupal\Component\DependencyInjection\ContainerInterface, \Symfony\Contracts\Service\ResetInterface uses \Drupal\Component\DependencyInjection\ServiceIdHashTrait
- class \Drupal\Core\DependencyInjection\Container extends \Drupal\Component\DependencyInjection\Container
- class \Drupal\FunctionalTests\Bootstrap\ExceptionContainer extends \Drupal\Core\DependencyInjection\Container
- class \Drupal\Core\DependencyInjection\Container extends \Drupal\Component\DependencyInjection\Container
Expanded class hierarchy of ExceptionContainer
File
-
core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ ExceptionContainer.php, line 13
Namespace
Drupal\FunctionalTests\BootstrapView source
class ExceptionContainer extends Container {
/**
* {@inheritdoc}
*/
public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) : ?object {
if ($id === 'http_kernel') {
throw new \Exception('Thrown exception during Container::get');
}
else {
return parent::get($id, $invalidBehavior);
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Container::$aliases | protected | property | The aliases of the container. | ||
Container::$frozen | protected | property | Whether the container parameters can still be changed. | ||
Container::$loading | protected | property | The currently loading services. | ||
Container::$parameters | protected | property | The parameters of the container. | ||
Container::$privateServices | protected | property | The instantiated private services. | ||
Container::$serviceDefinitions | protected | property | The service definitions of the container. | ||
Container::$services | protected | property | The instantiated services. | ||
Container::createService | protected | function | Creates a service from a service definition. | 1 | |
Container::getAlternatives | protected | function | Provides alternatives for a given array and key. | ||
Container::getParameter | public | function | |||
Container::getParameterAlternatives | protected | function | Provides alternatives in case a parameter was not found. | ||
Container::getServiceAlternatives | protected | function | Provides alternatives in case a service was not found. | ||
Container::getServiceIds | public | function | Gets all defined service IDs. | Overrides ContainerInterface::getServiceIds | |
Container::has | public | function | |||
Container::hasParameter | public | function | |||
Container::initialized | public | function | |||
Container::reset | public | function | Resets shared services from the container. | ||
Container::resolveServicesAndParameters | protected | function | Resolves arguments that represent services or variables to the real values. | 1 | |
Container::set | public | function | phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn | ||
Container::setParameter | public | function | phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn | ||
Container::__clone | private | function | Ensure that cloning doesn't work. | ||
Container::__construct | public | function | Constructs a new Container instance. | 1 | |
Container::__sleep | public | function | |||
ExceptionContainer::get | public | function | Overrides Container::get | ||
ServiceIdHashTrait::generateServiceIdHash | public | function | Implements \Drupal\Component\DependencyInjection\ContainerInterface::generateServiceIdHash() | ||
ServiceIdHashTrait::getServiceIdMappings | public | function | Implements \Drupal\Component\DependencyInjection\ContainerInterface::getServiceIdMappings() |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.