ThrowPromise
in package
implements
PromiseInterface
Throw promise.
Tags
Interfaces, Classes and Traits
- PromiseInterface
- Promise interface.
Table of Contents
- $exception : mixed
- $instantiator : Instantiator
- __construct() : mixed
- Initializes promise.
- execute() : mixed
- Throws predefined exception.
- isAValidThrowable() : bool
Properties
$exception
private
mixed
$exception
$instantiator
private
Instantiator
$instantiator
Methods
__construct()
Initializes promise.
public
__construct(string|Exception|Throwable $exception) : mixed
Parameters
- $exception : string|Exception|Throwable
-
Exception class name or instance
Tags
Return values
mixed —execute()
Throws predefined exception.
public
execute(array<string|int, mixed> $args, ObjectProphecy $object, MethodProphecy $method) : mixed
Parameters
- $args : array<string|int, mixed>
- $object : ObjectProphecy
- $method : MethodProphecy
Tags
Return values
mixed —isAValidThrowable()
private
isAValidThrowable(string $exception) : bool
Parameters
- $exception : string