|
| __construct (array $queue=null, callable $onFulfilled=null, callable $onRejected=null) |
| The passed in value must be an array of {.
|
|
| __invoke (RequestInterface $request, array $options) |
|
| append (... $values) |
| Adds one or more variadic requests, exceptions, callables, or promises to the queue.
|
|
| count () |
| Returns the number of remaining items in the queue.
|
|
| getLastOptions () |
| Get the last received request options.
|
|
| getLastRequest () |
| Get the last received request.
|
|
| reset () |
|
|
static | createWithMiddleware (array $queue=null, callable $onFulfilled=null, callable $onRejected=null) |
| Creates a new MockHandler that uses the default handler stack list of middlewares.
|
|
◆ __construct()
GuzzleHttp\Handler\MockHandler::__construct |
( |
array | $queue = null, |
|
|
callable | $onFulfilled = null, |
|
|
callable | $onRejected = null ) |
The passed in value must be an array of {.
- See also
- Psr\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
- Parameters
-
| array<int,mixed>|null | $queue The parameters to be passed to the append function, as an indexed array. |
callable | null | $onFulfilled | Callback to invoke when the return value is fulfilled. |
callable | null | $onRejected | Callback to invoke when the return value is rejected. |
◆ append()
GuzzleHttp\Handler\MockHandler::append |
( |
| ... | ) |
|
Adds one or more variadic requests, exceptions, callables, or promises to the queue.
- Parameters
-
◆ createWithMiddleware()
static GuzzleHttp\Handler\MockHandler::createWithMiddleware |
( |
array | $queue = null, |
|
|
callable | $onFulfilled = null, |
|
|
callable | $onRejected = null ) |
|
static |
Creates a new MockHandler that uses the default handler stack list of middlewares.
- Parameters
-
array | null | $queue | Array of responses, callables, or exceptions. |
callable | null | $onFulfilled | Callback to invoke when the return value is fulfilled. |
callable | null | $onRejected | Callback to invoke when the return value is rejected. |
The documentation for this class was generated from the following file:
- lib/guzzlehttp/guzzle/src/Handler/MockHandler.php