InvalidArgumentException
Represent invalid arguments detected by the event dispatcher package.
Methods
Create an exception for an array that was expected to be a list.
Create an exception for a subscriber class that does not implement the required contract.
Prevent direct instantiation outside the named factories.
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
Description
exception describing the invalid array shape
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
Description
exception describing the invalid subscriber class
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