/**
  * Creates a multi request created event.
  *
  * @param \Ivory\HttpAdapter\HttpAdapterInterface $httpAdapter The http adapter.
  * @param array                                   $requests    The requests.
  */
 public function __construct(HttpAdapterInterface $httpAdapter, array $requests)
 {
     parent::__construct($httpAdapter);
     $this->setRequests($requests);
 }
Ejemplo n.º 2
0
 /**
  * Creates a request created event.
  *
  * @param \Ivory\HttpAdapter\HttpAdapterInterface             $httpAdapter The http adapter.
  * @param \Ivory\HttpAdapter\Message\InternalRequestInterface $request     The request.
  */
 public function __construct(HttpAdapterInterface $httpAdapter, InternalRequestInterface $request)
 {
     parent::__construct($httpAdapter);
     $this->setRequest($request);
 }
 /**
  * Creates a multi request errored event.
  *
  * @param \Ivory\HttpAdapter\HttpAdapterInterface   $httpAdapter The http adapter.
  * @param \Ivory\HttpAdapter\HttpAdapterException[] $exceptions  The exceptions.
  */
 public function __construct(HttpAdapterInterface $httpAdapter, array $exceptions)
 {
     parent::__construct($httpAdapter);
     $this->setExceptions($exceptions);
 }
Ejemplo n.º 4
0
 /**
  * Creates an exception event.
  *
  * @param \Ivory\HttpAdapter\HttpAdapterInterface $httpAdapter The http adapter.
  * @param \Ivory\HttpAdapter\HttpAdapterException $exception   The exception.
  */
 public function __construct(HttpAdapterInterface $httpAdapter, HttpAdapterException $exception)
 {
     parent::__construct($httpAdapter);
     $this->setException($exception);
 }