Property | Type | Description | |
---|---|---|---|
$canceller | callable | ||
$currentCancellations | integer | ||
$handlers | callable[] | ||
$requiredCancellations | integer | ||
$result | Kraken\Promise\PromiseInterface | null |
Method | Description | |
---|---|---|
__construct ( callable $resolver = null, callable $canceller = 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 ) |
Method | Description | |
---|---|---|
getReason ( ) : Erro\Error | Exceptio\Exception | string | null | Return rejection or cancellation reason for Promise. | |
getResult ( ) : Kraken\Promise\PromiseInterface | null | Get Promise result. Returns fulfilled, rejected or cancelled Promise for settled Promises or null for pending. | |
getValue ( ) : mixed | null | Return primitive value associated with Promise. | |
mutate ( callable $resolver = null ) | Mutate resolver. | |
settle ( Kraken\Promise\PromiseInterface $promise ) : Kraken\Promise\PromiseInterface | Settle Promise with another Promise. |
public __construct ( callable $resolver = null, callable $canceller = null ) | ||
$resolver | callable | |
$canceller | callable |
protected settle ( Kraken\Promise\PromiseInterface $promise ) : Kraken\Promise\PromiseInterface | ||
$promise | Kraken\Promise\PromiseInterface | |
return | Kraken\Promise\PromiseInterface |
protected PromiseInterface,Kraken\Promise|null $result | ||
return | Kraken\Promise\PromiseInterface | null |