Class

eZ\Publish\Core\Base\Exceptions\InvalidArgumentType

class InvalidArgumentType extends InvalidArgumentException

Invalid Argument Type Exception implementation.

Usage: throw new InvalidArgument( 'nodes', 'array' );

Methods

__construct(string $argumentName, string $expectedType, mixed|null $value = null, Exception $previous = null)

Generates: "Argument '{$argumentName}' is invalid: expected value to be of type '{$expectedType}'[, got '{$value}']".

Details

at line 28
public __construct(string $argumentName, string $expectedType, mixed|null $value = null, Exception $previous = null)

Generates: "Argument '{$argumentName}' is invalid: expected value to be of type '{$expectedType}'[, got '{$value}']".

Parameters

string $argumentName
string $expectedType
mixed|null $value Optionally to output the type that was received
Exception $previous