Handler that returns responses or throw exceptions from a queue.
- final
CloneableInstantiable
- Implements
Countable
Methods |
public __construct(?array $queue = NULL, ?callable $onFulfilled = NULL, ?callable $onRejected = NULL) The passed in value must be an array of {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
|
public __invoke(Psr\Http\Message\RequestInterface $request, array $options) : GuzzleHttp |
public append( $values) : void Adds one or more variadic requests, exceptions, callables, or promises to the queue.
|
public count() : int Returns the number of remaining items in the queue. |
public static createWithMiddleware(?array $queue = NULL, ?callable $onFulfilled = NULL, ?callable $onRejected = NULL) : GuzzleHttp Creates a new MockHandler that uses the default handler stack list of middlewares.
|
public getLastOptions() : array Get the last received request options. |
public getLastRequest() : ?Psr\Http\Message\RequestInterface Get the last received request. |
public reset() : void |
Properties |
private $lastOptions = []
|
private $lastRequest = NULL
|
private $onFulfilled = NULL
|
private $onRejected = NULL
|
private $queue = []
|
Methods |
private invokeStats(Psr\Http\Message\RequestInterface $request, array $options, ?Psr\Http\Message\ResponseInterface $response = NULL, $reason = NULL) : void
|
Methods |
public static createWithMiddleware(?array $queue = NULL, ?callable $onFulfilled = NULL, ?callable $onRejected = NULL) : GuzzleHttp Creates a new MockHandler that uses the default handler stack list of middlewares.
|