InvalidTypeException

Type
Class
Namespace
craft\errors
Inherits
craft\errors\InvalidTypeException » yii\base\Exception » Exception
Since
3.0

Class InvalidTypeException

View source

Public Properties

PropertyDescription
$classstring, null – The invalid class name
$requiredTypestring, null – The base class or interface that $class was supposed to be

$class

Type
string, null

The invalid class name

View source

Signature

public string, null $class = null

$requiredType

Type
string, null

The base class or interface that $class was supposed to be

View source

Signature

public string, null $requiredType = null

Public Methods

MethodDescription
__construct()Constructor.
getName()

__construct()

Constructor.

View source

Arguments

  • $handle (string) – The class that doesn’t exist or doesn’t extend/implement $requiredType
  • $requiredType (string) – The base class or interface that $class was supposed to be
  • $message (string, null) – The error message
  • $code (integer) – The error code

Signature

public void __construct ( \craft\errors\string $handle, \craft\errors\string $requiredType, \craft\errors\string $message = null, \craft\errors\int $code = 0 )

getName()

View source

Returns

string – The user-friendly name of this exception

Signature

public string getName ( )