0 follower

Final Class Yiisoft\Di\CompositeNotFoundException

InheritanceYiisoft\Di\CompositeNotFoundException » Exception
ImplementsPsr\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

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Di\CompositeNotFoundException

Method Details

Hide inherited methods

__construct() public method

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));
}