PHP Class React\Promise\LazyPromise

Inheritance: implements React\Promise\PromiseInterface
Show file Open project: reactphp/promise Class Usage Examples

Public Methods

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

Method Details

__construct() public method

public __construct ( callable $factory )
$factory 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

promise() public method

See also: Promise::settle()
public promise ( )

then() public method

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