PHP Class React\Promise\Promise

Inheritance: implements React\Promise\ExtendedPromiseInterface, implements React\Promise\CancellablePromiseInterface
Datei anzeigen Open project: reactphp/promise Class Usage Examples

Public Methods

Method Description
__construct ( callable $resolver, callable $canceller = null )
always ( callable $onFulfilledOrRejected )
cancel ( )
done ( callable $onFulfilled = null, callable $onRejected = null )
otherwise ( callable $onRejected )
then ( callable $onFulfilled = null, callable $onRejected = null )

Private Methods

Method Description
call ( callable $callback )
reject ( $reason = null )
resolve ( $value = null )
resolver ( callable $onFulfilled = null, callable $onRejected = null )
result ( )
settle ( React\Promise\ExtendedPromiseInterface $result )

Method Details

__construct() public method

public __construct ( callable $resolver, callable $canceller = null )
$resolver callable
$canceller callable

always() public method

public always ( callable $onFulfilledOrRejected )
$onFulfilledOrRejected callable

cancel() public method

public cancel ( )

done() public method

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

otherwise() public method

public otherwise ( callable $onRejected )
$onRejected callable

then() public method

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