Lines Matching refs:PromiseInterface
43 public static function task(callable $task): PromiseInterface
70 * @param PromiseInterface $promise Promise or value.
72 public static function inspect(PromiseInterface $promise): array
76 'state' => PromiseInterface::FULFILLED,
80 return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
82 return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
94 * @param PromiseInterface[] $promises Traversable of promises to wait upon.
138 public static function all($promises, bool $recursive = false): PromiseInterface
184 public static function some(int $count, $promises): PromiseInterface
191 function ($value, $idx, PromiseInterface $p) use (&$results, $count): void {
224 public static function any($promises): PromiseInterface
241 public static function settle($promises): PromiseInterface
248 $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
251 $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];