class ExceptionContainer in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
- 10 core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
Base container which throws an exception.
Hierarchy
- class \Drupal\Component\DependencyInjection\Container implements \Symfony\Component\DependencyInjection\ContainerInterface, \Symfony\Contracts\Service\ResetInterface
- class \Drupal\Core\DependencyInjection\Container
- class \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
- class \Drupal\Core\DependencyInjection\Container
Expanded class hierarchy of ExceptionContainer
File
- core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ ExceptionContainer.php, line 10
Namespace
Drupal\FunctionalTests\BootstrapView source
class ExceptionContainer extends Container {
/**
* {@inheritdoc}
*/
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
if ($id === 'http_kernel') {
throw new \Exception('Thrown exception during Container::get');
}
else {
return parent::get($id, $invalidBehavior);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Container:: |
protected | property | The aliases of the container. | |
Container:: |
protected | property | Whether the container parameters can still be changed. | |
Container:: |
protected | property | The currently loading services. | |
Container:: |
protected | property | The parameters of the container. | |
Container:: |
protected | property | The instantiated private services. | |
Container:: |
protected | property | The service definitions of the container. | |
Container:: |
protected | property | The instantiated services. | |
Container:: |
protected | function | Creates a service from a service definition. | 1 |
Container:: |
protected | function | Provides alternatives for a given array and key. | |
Container:: |
public | function | ||
Container:: |
protected | function | Provides alternatives in case a parameter was not found. | |
Container:: |
protected | function | Provides alternatives in case a service was not found. | |
Container:: |
public | function | Gets all defined service IDs. | |
Container:: |
public | function | ||
Container:: |
public | function | ||
Container:: |
public | function | ||
Container:: |
public | function | Resets shared services from the container. | |
Container:: |
protected | function | Resolves arguments that represent services or variables to the real values. | 1 |
Container:: |
public | function |
Overrides Container:: |
|
Container:: |
public | function | ||
Container:: |
private | function | Ensure that cloning doesn't work. | |
Container:: |
public | function | Constructs a new Container instance. | 1 |
Container:: |
public | function | ||
ExceptionContainer:: |
public | function |
Overrides Container:: |