PHP Class Amp\Internal\WhenQueue

Show file Open project: amphp/amp Class Usage Examples

Public Methods

Method Description
__construct ( callable $callback = null )
__invoke ( Throwable | null $exception, mixed $value ) Calls each callback in the queue, passing the provided values to the function.
push ( callable $callback ) Unrolls instances of self to avoid blowing up the call stack on resolution.

Method Details

__construct() public method

public __construct ( callable $callback = null )
$callback callable Initial callback to add to queue.

__invoke() public method

Calls each callback in the queue, passing the provided values to the function.
public __invoke ( Throwable | null $exception, mixed $value )
$exception Throwable | null
$value mixed

push() public method

Unrolls instances of self to avoid blowing up the call stack on resolution.
public push ( callable $callback )
$callback callable