Final Class Yiisoft\Di\CompositeNotFoundException
| Inheritance | Yiisoft\Di\CompositeNotFoundException » Exception |
|---|---|
| Implements | Psr\Container\NotFoundExceptionInterface |
CompositeNotFoundException is thrown when no definition or class was found in the composite container
for a given ID. It contains all exceptions thrown by containers registered in the composite container.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Di\CompositeNotFoundException |
Method Details
| public mixed __construct ( array $exceptions ) | ||
| $exceptions | array |
Container exceptions in [throwable, container] format. |
public function __construct(array $exceptions)
{
$message = '';
foreach ($exceptions as $i => [$exception, $container]) {
$containerClass = $container::class;
$containerId = spl_object_id($container);
$number = $i + 1;
$message .= "\n $number. Container $containerClass #$containerId: {$exception->getMessage()}";
}
parent::__construct(sprintf('No definition or class found or resolvable in composite container:%s', $message));
}
Signup or Login in order to comment.