public function PromiseInterface::wait in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/src/PromiseInterface.php \GuzzleHttp\Promise\PromiseInterface::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.
4 methods override PromiseInterface::wait()
- FulfilledPromise::wait in vendor/
guzzlehttp/ promises/ src/ FulfilledPromise.php - Waits until the promise completes if possible.
- NotPromiseInstance::wait in vendor/
guzzlehttp/ promises/ tests/ NotPromiseInstance.php - Waits until the promise completes if possible.
- Promise::wait in vendor/
guzzlehttp/ promises/ src/ Promise.php - Waits until the promise completes if possible.
- RejectedPromise::wait in vendor/
guzzlehttp/ promises/ src/ RejectedPromise.php - Waits until the promise completes if possible.
File
- vendor/
guzzlehttp/ promises/ src/ PromiseInterface.php, line 92
Class
- PromiseInterface
- A promise represents the eventual result of an asynchronous operation.
Namespace
GuzzleHttp\PromiseCode
public function wait($unwrap = true);