0 follower

Class yii\di\NotInstantiableException

Inheritanceyii\di\NotInstantiableException » yii\base\InvalidConfigException » yii\base\Exception » Exception
Available since version2.0.9
Source Code https://github.com/yiisoft/yii2/blob/master/framework/di/NotInstantiableException.php

NotInstantiableException represents an exception caused by incorrect dependency injection container configuration or usage.

Method Details

Hide inherited methods

__construct() public method

public void __construct ( $class, $message null, $code 0, $previous null )
$class
$message
$code
$previous

                public function __construct($class, $message = null, $code = 0, $previous = null)
{
    if ($message === null) {
        $message = "Can not instantiate $class.";
    }
    parent::__construct($message, $code, $previous);
}

            
getName() public method

public string getName ( )
return string

The user-friendly name of this exception

                public function getName()
{
    return 'Not instantiable';
}