[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/guzzlehttp/guzzle/src/Event/ -> BeforeEvent.php (source)

   1  <?php
   2  namespace GuzzleHttp\Event;
   3  
   4  use GuzzleHttp\Message\ResponseInterface;
   5  
   6  /**
   7   * Event object emitted before a request is sent.
   8   *
   9   * This event MAY be emitted multiple times (i.e., if a request is retried).
  10   * You MAY change the Response associated with the request using the
  11   * intercept() method of the event.
  12   */
  13  class BeforeEvent extends AbstractRequestEvent
  14  {
  15      /**
  16       * Intercept the request and associate a response
  17       *
  18       * @param ResponseInterface $response Response to set
  19       */
  20      public function intercept(ResponseInterface $response)
  21      {
  22          $this->transaction->response = $response;
  23          $this->transaction->exception = null;
  24          $this->stopPropagation();
  25      }
  26  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1