public function FulfilledPromise::resolve in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/src/FulfilledPromise.php \GuzzleHttp\Promise\FulfilledPromise::resolve()
Resolve the promise with the given value.
Parameters
mixed $value:
Throws
\RuntimeException if the promise is already resolved.
Overrides PromiseInterface::resolve
File
- vendor/
guzzlehttp/ promises/ src/ FulfilledPromise.php, line 64
Class
- FulfilledPromise
- A promise that has been fulfilled.
Namespace
GuzzleHttp\PromiseCode
public function resolve($value) {
if ($value !== $this->value) {
throw new \LogicException("Cannot resolve a fulfilled promise");
}
}