class ExceptionContainer
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php \Drupal\FunctionalTests\Bootstrap\ExceptionContainer
- 10 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
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 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);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.