You are here

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

Adds one or more variadic requests, exceptions, callables, or promises to the queue.

File

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

Class

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

Namespace

GuzzleHttp\Handler

Code

public function append() {
  foreach (func_get_args() as $value) {
    if ($value instanceof ResponseInterface || $value instanceof \Exception || $value instanceof PromiseInterface || is_callable($value)) {
      $this->queue[] = $value;
    }
    else {
      throw new \InvalidArgumentException('Expected a response or ' . 'exception. Found ' . \GuzzleHttp\describe_type($value));
    }
  }
}