Kraken\Promise\Promise::mutate PHP Метод

mutate() защищенный Метод

Mutate resolver.
protected mutate ( callable $resolver = null )
$resolver callable
    protected function mutate(callable $resolver = null)
    {
        if ($resolver === null) {
            return;
        }
        try {
            $resolver(function ($value = null) {
                $this->resolve($value);
            }, function ($reason = null) {
                $this->reject($reason);
            }, function ($reason = null) {
                $this->cancel($reason);
            });
        } catch (Error $ex) {
            $this->reject($ex);
        } catch (Exception $ex) {
            $this->reject($ex);
        }
    }