[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/guzzlehttp/guzzle/src/Message/ -> ResponseInterface.php (source)

   1  <?php
   2  namespace GuzzleHttp\Message;
   3  
   4  /**
   5   * Represents an HTTP response message.
   6   */
   7  interface ResponseInterface extends MessageInterface
   8  {
   9      /**
  10       * Gets the response Status-Code.
  11       *
  12       * The Status-Code is a 3-digit integer result code of the server's attempt
  13       * to understand and satisfy the request.
  14       *
  15       * @return int Status code.
  16       */
  17      public function getStatusCode();
  18  
  19      /**
  20       * Sets the status code of this response.
  21       *
  22       * @param int $code The 3-digit integer result code to set.
  23       */
  24      public function setStatusCode($code);
  25  
  26      /**
  27       * Gets the response Reason-Phrase, a short textual description of the
  28       * Status-Code.
  29       *
  30       * Because a Reason-Phrase is not a required element in response
  31       * Status-Line, the Reason-Phrase value MAY be null. Implementations MAY
  32       * choose to return the default RFC 2616 recommended reason phrase for the
  33       * response's Status-Code.
  34       *
  35       * @return string|null Reason phrase, or null if unknown.
  36       */
  37      public function getReasonPhrase();
  38  
  39      /**
  40       * Sets the Reason-Phrase of the response.
  41       *
  42       * If no Reason-Phrase is specified, implementations MAY choose to default
  43       * to the RFC 2616 recommended reason phrase for the response's Status-Code.
  44       *
  45       * @param string $phrase The Reason-Phrase to set.
  46       */
  47      public function setReasonPhrase($phrase);
  48  
  49      /**
  50       * Get the effective URL that resulted in this response (e.g. the last
  51       * redirect URL).
  52       *
  53       * @return string
  54       */
  55      public function getEffectiveUrl();
  56  
  57      /**
  58       * Set the effective URL that resulted in this response (e.g. the last
  59       * redirect URL).
  60       *
  61       * @param string $url Effective URL
  62       */
  63      public function setEffectiveUrl($url);
  64  
  65      /**
  66       * Parse the JSON response body and return the JSON decoded data.
  67       *
  68       * @param array $config Associative array of configuration settings used
  69       *     to control how the JSON data is parsed. Concrete implementations MAY
  70       *     add further configuration settings as needed, but they MUST implement
  71       *     functionality for the following options:
  72       *
  73       *     - object: Set to true to parse JSON objects as PHP objects rather
  74       *       than associative arrays. Defaults to false.
  75       *     - big_int_strings: When set to true, large integers are converted to
  76       *       strings rather than floats. Defaults to false.
  77       *
  78       *     Implementations are free to add further configuration settings as
  79       *     needed.
  80       *
  81       * @return mixed Returns the JSON decoded data based on the provided
  82       *     parse settings.
  83       * @throws \RuntimeException if the response body is not in JSON format
  84       */
  85      public function json(array $config = []);
  86  
  87      /**
  88       * Parse the XML response body and return a \SimpleXMLElement.
  89       *
  90       * In order to prevent XXE attacks, this method disables loading external
  91       * entities. If you rely on external entities, then you must parse the
  92       * XML response manually by accessing the response body directly.
  93       *
  94       * @param array $config Associative array of configuration settings used
  95       *     to control how the XML is parsed. Concrete implementations MAY add
  96       *     further configuration settings as needed, but they MUST implement
  97       *     functionality for the following options:
  98       *
  99       *     - ns: Set to a string to represent the namespace prefix or URI
 100       *     - ns_is_prefix: Set to true to specify that the NS is a prefix rather
 101       *       than a URI (defaults to false).
 102       *     - libxml_options: Bitwise OR of the libxml option constants
 103       *       listed at http://php.net/manual/en/libxml.constants.php
 104       *       (defaults to LIBXML_NONET)
 105       *
 106       * @return \SimpleXMLElement
 107       * @throws \RuntimeException if the response body is not in XML format
 108       * @link http://websec.io/2012/08/27/Preventing-XXE-in-PHP.html
 109       */
 110      public function xml(array $config = []);
 111  }


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