Lines Matching defs:onRejected
28 public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
31 return $this->result->then($onFulfilled, $onRejected, $onProgress);
35 return new static($this->resolver($onFulfilled, $onRejected, $onProgress));
47 $this->resolver($onFulfilled, $onRejected, $onProgress),
58 public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
61 return $this->result->done($onFulfilled, $onRejected, $onProgress);
64 $this->handlers[] = static function (ExtendedPromiseInterface $promise) use ($onFulfilled, $onRejected) {
66 ->done($onFulfilled, $onRejected);
74 public function otherwise(callable $onRejected)
76 return $this->then(null, static function ($reason) use ($onRejected) {
77 if (!_checkTypehint($onRejected, $reason)) {
81 return $onRejected($reason);
115 private function resolver(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
117 return function ($resolve, $reject, $notify) use ($onFulfilled, $onRejected, $onProgress) {
132 $this->handlers[] = static function (ExtendedPromiseInterface $promise) use ($onFulfilled, $onRejected, $resolve, $reject, $progressHandler) {
134 ->then($onFulfilled, $onRejected)