Make WordPress Core

Changeset 38120


Ignore:
Timestamp:
07/20/2016 04:33:11 PM (7 years ago)
Author:
DrewAPicture
Message:

Docs: Add missing inline documentation in WP_HTTP_Requests_Response.

  • Adds a missing file header
  • Adjusts class DocBlock
  • Adds missing version and access information for all methods

See #37318, [37428] and #33055.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-http-requests-response.php

    r37989 r38120  
    11<?php
    2 
    32/**
    4  * Wrapper object for a Requests_Response for standardisation.
     3 * HTTP API: WP_HTTP_Requests_Response class
    54 *
    65 * @package WordPress
     
    87 * @since 4.6.0
    98 */
     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 */
    1017class WP_HTTP_Requests_Response extends WP_HTTP_Response {
    1118    /**
    1219     * Requests Response object.
    1320     *
     21     * @since 4.6.0
     22     * @access protected
    1423     * @var Requests_Response
    1524     */
     
    1928     * Filename the response was saved to.
    2029     *
     30     * @since 4.6.0
     31     * @access protected
    2132     * @var string|null
    2233     */
     
    2536    /**
    2637     * 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.
    2744     */
    2845    public function __construct( Requests_Response $response, $filename = '' ) {
     
    3249
    3350    /**
    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.
    3757     */
    3858    public function get_response_object() {
     
    4262    /**
    4363     * Retrieves headers associated with the response.
     64     *
     65     * @since 4.6.0
     66     * @access public
    4467     *
    4568     * @return array Map of header name to header value.
     
    6487     * Sets all header values.
    6588     *
     89     * @since 4.6.0
     90     * @access public
     91     *
    6692     * @param array $headers Map of header name to header value.
    6793     */
     
    7298    /**
    7399     * Sets a single HTTP header.
     100     *
     101     * @since 4.6.0
     102     * @access public
    74103     *
    75104     * @param string $key     Header name.
     
    89118     * Retrieves the HTTP return code for the response.
    90119     *
     120     * @since 4.6.0
     121     * @access public
     122     *
    91123     * @return int The 3-digit HTTP status code.
    92124     */
     
    98130     * Sets the 3-digit HTTP status code.
    99131     *
     132     * @since 4.6.0
     133     * @access public
     134     *
    100135     * @param int $code HTTP status.
    101136     */
     
    107142     * Retrieves the response data.
    108143     *
     144     * @since 4.6.0
     145     * @access public
     146     *
    109147     * @return mixed Response data.
    110148     */
     
    116154     * Sets the response data.
    117155     *
     156     * @since 4.6.0
     157     * @access public
     158     *
    118159     * @param mixed $data Response data.
    119160     */
     
    123164
    124165    /**
    125      * Get cookies from the response.
     166     * Retrieves cookies from the response.
     167     *
     168     * @since 4.6.0
     169     * @access public
    126170     *
    127171     * @return WP_HTTP_Cookie[] List of cookie objects.
     
    143187
    144188    /**
    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
    146193     *
    147194     * @return array WP_Http response array, per WP_Http::request().
Note: See TracChangeset for help on using the changeset viewer.