Menu

## ThrowPromise
in package
implements PromiseInterface

ThrowPromise.php : 25

Throw promise.

##### Tags

author

  Konstantin Kudryashov ever.zet@gmail.com

### 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

ThrowPromise.php : 27
`private mixed $exception`

#### $instantiator

ThrowPromise.php : 32
`private Instantiator $instantiator`

### Methods

#### __construct()

ThrowPromise.php : 41

Initializes promise.

`public __construct(string|Exception|Throwable $exception) : mixed`

##### Parameters

$exception : string|Exception|Throwable

  Exception class name or instance

##### Tags

throws
  InvalidArgumentException

##### Return values

mixed —

#### execute()

ThrowPromise.php : 69

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

throws
  object

##### Return values

mixed —

#### isAValidThrowable()

ThrowPromise.php : 95
`private isAValidThrowable(string $exception) : bool`

##### Parameters

$exception : string

##### Return values

bool —

## Search results