PHP Class Kraken\Promise\PromiseRejected

Inheritance: implements Kraken\Promise\PromiseInterface
Show file Open project: kraken-php/framework

Protected Properties

Property Type Description
$reason Erro\Error | Exceptio\Exception | Kraken\Throwable\ThrowableProxy | string | null

Public Methods

Method Description
__construct ( $reason = null )
__destruct ( )
abort ( callable $onCancel )
always ( callable $onFulfilledOrRejected )
cancel ( $reason = null )
done ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )
failure ( callable $onFailure )
getPromise ( )
isCancelled ( )
isFulfilled ( )
isPending ( )
isRejected ( )
reject ( $reason = null )
resolve ( $value = null )
spread ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )
success ( callable $onSuccess )
then ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )

Protected Methods

Method Description
getReason ( )
getValue ( )
throwError ( Erro\Error | Exceptio\Exception | string $reason )

Method Details

__construct() public method

public __construct ( $reason = null )

__destruct() public method

public __destruct ( )

abort() public method

public abort ( callable $onCancel )
$onCancel callable

always() public method

public always ( callable $onFulfilledOrRejected )
$onFulfilledOrRejected callable

cancel() public method

public cancel ( $reason = null )

done() public method

public done ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )
$onFulfilled callable
$onRejected callable
$onCancel callable

failure() public method

public failure ( callable $onFailure )
$onFailure callable

getPromise() public method

public getPromise ( )

getReason() protected method

See also: Promise::getReason
protected getReason ( )

getValue() protected method

See also: Promise::getValue
protected getValue ( )

isCancelled() public method

public isCancelled ( )

isFulfilled() public method

public isFulfilled ( )

isPending() public method

public isPending ( )

isRejected() public method

public isRejected ( )

reject() public method

public reject ( $reason = null )

resolve() public method

public resolve ( $value = null )

spread() public method

public spread ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )
$onFulfilled callable
$onRejected callable
$onCancel callable

success() public method

public success ( callable $onSuccess )
$onSuccess callable

then() public method

public then ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )
$onFulfilled callable
$onRejected callable
$onCancel callable

throwError() protected method

protected throwError ( Erro\Error | Exceptio\Exception | string $reason )
$reason Erro\Error | Exceptio\Exception | string

Property Details

$reason protected property

protected Error,Erro|Exception,Exceptio|ThrowableProxy,Kraken\Throwable|string|null $reason
return Erro\Error | Exceptio\Exception | Kraken\Throwable\ThrowableProxy | string | null