You are here

public function FulfilledPromise::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/promises/src/FulfilledPromise.php \GuzzleHttp\Promise\FulfilledPromise::__construct()

File

vendor/guzzlehttp/promises/src/FulfilledPromise.php, line 14

Class

FulfilledPromise
A promise that has been fulfilled.

Namespace

GuzzleHttp\Promise

Code

public function __construct($value) {
  if (method_exists($value, 'then')) {
    throw new \InvalidArgumentException('You cannot create a FulfilledPromise with a promise.');
  }
  $this->value = $value;
}