GuzzleHttp\Handler\MockHandler::__construct PHP Method

__construct() public method

The passed in value must be an array of {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
public __construct ( array $queue = null, callable $onFulfilled = null, callable $onRejected = null )
$queue array
$onFulfilled callable Callback to invoke when the return value is fulfilled.
$onRejected callable Callback to invoke when the return value is rejected.
    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);
        }
    }