InvalidArgumentException

Class
extends InvalidArgumentException
Final: Yes

Represent invalid arguments detected by the event dispatcher package.

Table of Contents

Methods

forExpectedArrayList()

Create an exception for an array that was expected to be a list.

 : self
forInvalidEventSubscriber()

Create an exception for a subscriber class that does not implement the required contract.

 : self
__construct()

Prevent direct instantiation outside the named factories.

 : mixed
Methods

forExpectedArrayList()

Public Static

Create an exception for an array that was expected to be a list.

public static forExpectedArrayList( array<string|int, mixed>  $array) : self
Parameters
$array : array<string|int, mixed>

Description

array that failed the list assertion

Return values
self

Description

exception describing the invalid array shape

forInvalidEventSubscriber()

Public Static

Create an exception for a subscriber class that does not implement the required contract.

public static forInvalidEventSubscriber( string  $eventSubscriber, string  $expectedInterface) : self
Parameters
$eventSubscriber : string

Description

subscriber class name

$expectedInterface : string

Description

required subscriber interface

Return values
self

Description

exception describing the invalid subscriber class

__construct()

Private

Prevent direct instantiation outside the named factories.

private __construct([ string  $message = ''][, int  $code = 0][, Throwable|null  $previous = null]) : mixed
Parameters
$message : string = ''

Description

exception message

$code : int = 0

Description

exception code

$previous : Throwable|null = null

Description

previous exception