You are here

public function FulfilledPromise::__construct in Lockr 7.3

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;
}