public function FulfilledPromise::wait in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/src/FulfilledPromise.php \GuzzleHttp\Promise\FulfilledPromise::wait()
Waits until the promise completes if possible.
Pass $unwrap as true to unwrap the result of the promise, either returning the resolved value or throwing the rejected exception.
If the promise cannot be waited on, then the promise will be rejected.
Parameters
bool $unwrap:
Return value
mixed
Throws
\LogicException if the promise has no wait function or if the promise does not settle after waiting.
Overrides PromiseInterface::wait
File
- vendor/
guzzlehttp/ promises/ src/ FulfilledPromise.php, line 54
Class
- FulfilledPromise
- A promise that has been fulfilled.
Namespace
GuzzleHttp\PromiseCode
public function wait($unwrap = true, $defaultDelivery = null) {
return $unwrap ? $this->value : null;
}