Handler that returns responses or throw exceptions from a queue.

CloneableInstantiable
ImplementsCountable
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\Promise\PromiseInterface
    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\HandlerStack
       

      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
         
        • var array
        private $lastRequest
         
        • var RequestInterface|null
        private $onFulfilled
         
        • var callable|null
        private $onRejected
         
        • var callable|null
        private $queue
         
        • var array
        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\HandlerStack
           

          Creates a new MockHandler that uses the default handler stack list of
          middlewares.

            © 2020 Bruce Wells
            Search Namespaces \ Classes
            ConfigurationNumbers (0-9.) only