Lines Matching defs:onProgress
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);
69 if ($onProgress) {
70 $this->progressHandlers[] = $onProgress;
98 public function progress(callable $onProgress)
100 return $this->then(null, null, $onProgress);
115 private function resolver(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
117 return function ($resolve, $reject, $notify) use ($onFulfilled, $onRejected, $onProgress) {
118 if ($onProgress) {
119 $progressHandler = static function ($update) use ($notify, $onProgress) {
121 $notify($onProgress($update));