Kraken\Promise\Promise::done PHP Method

done() public method

public done ( callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null )
$onFulfilled callable
$onRejected callable
$onCancel callable
    public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null)
    {
        if (null !== $this->result) {
            $this->getResult()->done($onFulfilled, $onRejected, $onCancel);
        }
        $this->handlers[] = function (PromiseInterface $promise) use($onFulfilled, $onRejected, $onCancel) {
            $promise->done($onFulfilled, $onRejected, $onCancel);
        };
    }