You are here

public function MockHandler::__construct in Auth0 Single Sign On 8.2

The passed in value must be an array of {callables, or Promises.

Parameters

array $queue:

callable $onFulfilled Callback to invoke when the return value is fulfilled.:

callable $onRejected Callback to invoke when the return value is rejected.:

See also

Psr7\Http\Message\ResponseInterface} objects, Exceptions,

File

vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php, line 50

Class

MockHandler
Handler that returns responses or throw exceptions from a queue.

Namespace

GuzzleHttp\Handler

Code

public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) {
  $this->onFulfilled = $onFulfilled;
  $this->onRejected = $onRejected;
  if ($queue) {
    call_user_func_array([
      $this,
      'append',
    ], $queue);
  }
}