0 follower

Final Class Yiisoft\Yii\Cycle\Exception\NotInstantiableClassException

InheritanceYiisoft\Yii\Cycle\Exception\NotInstantiableClassException » Exception
ImplementsPsr\Container\ContainerExceptionInterface, Yiisoft\FriendlyException\FriendlyExceptionInterface

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string $class, string|null $message null, integer $code 0, Exception|null $previous null )
$class string
$message string|null
$code integer
$previous Exception|null

                #[Pure]
public function __construct(string $class, ?string $message = null, int $code = 0, ?Exception $previous = null)
{
    if ($message === null) {
        $message = sprintf(
            'Can not instantiate "%s" because it is not a subclass of "%s".',
            $class,
            RepositoryInterface::class
        );
    }
    parent::__construct($message, $code, $previous);
}

            
getName() public method

public string getName ( )

                #[\Override]
public function getName(): string
{
    return 'Repository not instantiable';
}

            
getSolution() public method

public string|null getSolution ( )

                #[\Override]
public function getSolution(): ?string
{
    return 'Make sure that the class is instantiable and implements ' . RepositoryInterface::class;
}