InvalidTypeException
- Type
- Class
- Namespace
- craft\errors
- Inherits
- craft\errors\InvalidTypeException » yii\base\Exception (opens new window) » Exception (opens new window)
- Since
- 3.0.0
Class InvalidTypeException
View source (opens new window)
# Public Properties
Property | Description |
---|---|
class | string (opens new window) – The invalid class name |
requiredType | string (opens new window) – The base class or interface that class was supposed to be |
# class
- Type
- string (opens new window)
- Default value
null
The invalid class name
View source (opens new window)
# requiredType
- Type
- string (opens new window)
- Default value
null
The base class or interface that class was supposed to be
View source (opens new window)
# Public Methods
Method | Description |
---|---|
__construct() | Constructor. |
getName() |
# __construct()
Constructor.
View source (opens new window)
Arguments
$class
(string (opens new window)) – The class that doesn’t exist or doesn’t extend/implement $requiredType$requiredType
(string (opens new window)) – The base class or interface that $class was supposed to be$message
(string (opens new window), null (opens new window)) – The error message$code
(integer (opens new window)) – The error code
# getName()
View source (opens new window)
Returns
string (opens new window) – The user-friendly name of this exception