Changeset 38120
- Timestamp:
- 07/20/2016 04:33:11 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-requests-response.php
r37989 r38120 1 1 <?php 2 3 2 /** 4 * Wrapper object for a Requests_Response for standardisation.3 * HTTP API: WP_HTTP_Requests_Response class 5 4 * 6 5 * @package WordPress … … 8 7 * @since 4.6.0 9 8 */ 9 10 /** 11 * Core wrapper object for a Requests_Response for standardisation. 12 * 13 * @since 4.6.0 14 * 15 * @see WP_HTTP_Response 16 */ 10 17 class WP_HTTP_Requests_Response extends WP_HTTP_Response { 11 18 /** 12 19 * Requests Response object. 13 20 * 21 * @since 4.6.0 22 * @access protected 14 23 * @var Requests_Response 15 24 */ … … 19 28 * Filename the response was saved to. 20 29 * 30 * @since 4.6.0 31 * @access protected 21 32 * @var string|null 22 33 */ … … 25 36 /** 26 37 * Constructor. 38 * 39 * @since 4.6.0 40 * @access public 41 * 42 * @param Requests_Response $response HTTP response. 43 * @param string $filename Optional. File name. Default empty. 27 44 */ 28 45 public function __construct( Requests_Response $response, $filename = '' ) { … … 32 49 33 50 /** 34 * Get the response object for the request. 35 * 36 * @return Requests_Response 51 * Retrieves the response object for the request. 52 * 53 * @since 4.6.0 54 * @access public 55 * 56 * @return Requests_Response HTTP response. 37 57 */ 38 58 public function get_response_object() { … … 42 62 /** 43 63 * Retrieves headers associated with the response. 64 * 65 * @since 4.6.0 66 * @access public 44 67 * 45 68 * @return array Map of header name to header value. … … 64 87 * Sets all header values. 65 88 * 89 * @since 4.6.0 90 * @access public 91 * 66 92 * @param array $headers Map of header name to header value. 67 93 */ … … 72 98 /** 73 99 * Sets a single HTTP header. 100 * 101 * @since 4.6.0 102 * @access public 74 103 * 75 104 * @param string $key Header name. … … 89 118 * Retrieves the HTTP return code for the response. 90 119 * 120 * @since 4.6.0 121 * @access public 122 * 91 123 * @return int The 3-digit HTTP status code. 92 124 */ … … 98 130 * Sets the 3-digit HTTP status code. 99 131 * 132 * @since 4.6.0 133 * @access public 134 * 100 135 * @param int $code HTTP status. 101 136 */ … … 107 142 * Retrieves the response data. 108 143 * 144 * @since 4.6.0 145 * @access public 146 * 109 147 * @return mixed Response data. 110 148 */ … … 116 154 * Sets the response data. 117 155 * 156 * @since 4.6.0 157 * @access public 158 * 118 159 * @param mixed $data Response data. 119 160 */ … … 123 164 124 165 /** 125 * Get cookies from the response. 166 * Retrieves cookies from the response. 167 * 168 * @since 4.6.0 169 * @access public 126 170 * 127 171 * @return WP_HTTP_Cookie[] List of cookie objects. … … 143 187 144 188 /** 145 * Convert the object to a WP_Http response array. 189 * Converts the object to a WP_Http response array. 190 * 191 * @since 4.6.0 192 * @access public 146 193 * 147 194 * @return array WP_Http response array, per WP_Http::request().
Note: See TracChangeset
for help on using the changeset viewer.