function Promise::unwrap
Parameters
PromiseInterface<T> $promise:
Return value
PromiseInterface<T>
2 calls to Promise::unwrap()
- Promise::cancel in vendor/
react/ promise/ src/ Promise.php - The `cancel()` method notifies the creator of the promise that there is no further interest in the results of the operation.
- Promise::settle in vendor/
react/ promise/ src/ Promise.php
File
-
vendor/
react/ promise/ src/ Promise.php, line 234
Class
- Promise
- @template T @template-implements PromiseInterface<T>
Namespace
React\PromiseCode
private function unwrap(PromiseInterface $promise) : PromiseInterface {
while ($promise instanceof self && null !== $promise->result) {
/** @var PromiseInterface<T> $promise */
$promise = $promise->result;
}
return $promise;
}