PATH:
home
/
beestk
/
sdx
/
___wp-includes.old
<?php /** * HTTP API: WP_HTTP_Requests_Response class * * @package WordPress * @subpackage HTTP * @since 4.6.0 */ /** * Core wrapper object for a Requests_Response for standardisation. * * @since 4.6.0 * * @see WP_HTTP_Response */ class WP_HTTP_Requests_Response extends WP_HTTP_Response { /** * Requests Response object. * * @since 4.6.0 * @access protected * @var Requests_Response */ protected $response; /** * Filename the response was saved to. * * @since 4.6.0 * @access protected * @var string|null */ protected $filename; /** * Constructor. * * @since 4.6.0 * @access public * * @param Requests_Response $response HTTP response. * @param string $filename Optional. File name. Default empty. */ public function __construct( Requests_Response $response, $filename = '' ) { $this->response = $response; $this->filename = $filename; } /** * Retrieves the response object for the request. * * @since 4.6.0 * @access public * * @return Requests_Response HTTP response. */ public function get_response_object() { return $this->response; } /** * Retrieves headers associated with the response. * * @since 4.6.0 * @access public * * @see \Requests_Utility_CaseInsensitiveDictionary * * @return \Requests_Utility_CaseInsensitiveDictionary Map of header name to header value. */ public function get_headers() { // Ensure headers remain case-insensitive. $converted = new Requests_Utility_CaseInsensitiveDictionary(); foreach ( $this->response->headers->getAll() as $key => $value ) { if ( count( $value ) === 1 ) { $converted[ $key ] = $value[0]; } else { $converted[ $key ] = $value; } } return $converted; } /** * Sets all header values. * * @since 4.6.0 * @access public * * @param array $headers Map of header name to header value. */ public function set_headers( $headers ) { $this->response->headers = new Requests_Response_Headers( $headers ); } /** * Sets a single HTTP header. * * @since 4.6.0 * @access public * * @param string $key Header name. * @param string $value Header value. * @param bool $replace Optional. Whether to replace an existing header of the same name. * Default true. */ public function header( $key, $value, $replace = true ) { if ( $replace ) { unset( $this->response->headers[ $key ] ); } $this->response->headers[ $key ] = $value; } /** * Retrieves the HTTP return code for the response. * * @since 4.6.0 * @access public * * @return int The 3-digit HTTP status code. */ public function get_status() { return $this->response->status_code; } /** * Sets the 3-digit HTTP status code. * * @since 4.6.0 * @access public * * @param int $code HTTP status. */ public function set_status( $code ) { $this->response->status_code = absint( $code ); } /** * Retrieves the response data. * * @since 4.6.0 * @access public * * @return mixed Response data. */ public function get_data() { return $this->response->body; } /** * Sets the response data. * * @since 4.6.0 * @access public * * @param mixed $data Response data. */ public function set_data( $data ) { $this->response->body = $data; } /** * Retrieves cookies from the response. * * @since 4.6.0 * @access public * * @return WP_HTTP_Cookie[] List of cookie objects. */ public function get_cookies() { $cookies = array(); foreach ( $this->response->cookies as $cookie ) { $cookies[] = new WP_Http_Cookie( array( 'name' => $cookie->name, 'value' => urldecode( $cookie->value ), 'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null, 'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null, 'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null, )); } return $cookies; } /** * Converts the object to a WP_Http response array. * * @since 4.6.0 * @access public * * @return array WP_Http response array, per WP_Http::request(). */ public function to_array() { return array( 'headers' => $this->get_headers(), 'body' => $this->get_data(), 'response' => array( 'code' => $this->get_status(), 'message' => get_status_header_desc( $this->get_status() ), ), 'cookies' => $this->get_cookies(), 'filename' => $this->filename, ); } }
[+]
..
[-] ms-settings.php
[open]
[-] class-wp-comment.php
[open]
[-] atomlib.php
[open]
[-] rss-functions.php
[open]
[-] class-walker-comment.php
[open]
[-] class-wp-simplepie-sanitize-kses.php
[open]
[-] registration.php
[open]
[+]
pomo
[-] class-wp-http-streams.php
[open]
[-] post-thumbnail-template.php
[open]
[+]
random_compat
[-] wp-db.php
[open]
[-] class.wp-styles.php
[open]
[-] feed-atom.php
[open]
[+]
customize
[-] session.php
[open]
[-] class-wp-admin-bar.php
[open]
[-] class-wp-customize-section.php
[open]
[-] widgets.php
[open]
[-] wp-diff.php
[open]
[-] class-wp-user.php
[open]
[-] script-loader.php
[open]
[-] class-wp-rewrite.php
[open]
[-] class-wp-customize-panel.php
[open]
[-] class-walker-category.php
[open]
[-] ms-deprecated.php
[open]
[-] comment-template.php
[open]
[-] capabilities.php
[open]
[-] link-template.php
[open]
[-] class-wp-editor.php
[open]
[-] class-wp-http-cookie.php
[open]
[+]
js
[-] feed-atom-comments.php
[open]
[-] class-wp-text-diff-renderer-inline.php
[open]
[-] functions.wp-styles.php
[open]
[-] class-wp-user-query.php
[open]
[-] class-phpass.php
[open]
[-] feed-rss.php
[open]
[+]
images
[-] media.php
[open]
[-] class-wp-oembed-controller.php
[open]
[-] class-wp-http-curl.php
[open]
[-] class-wp-walker.php
[open]
[-] feed-rss2.php
[open]
[-] author-template.php
[open]
[-] class-feed.php
[open]
[-] cron.php
[open]
[-] class-walker-page-dropdown.php
[open]
[+]
ID3
[-] class-phpmailer.php
[open]
[-] class-wp-dependency.php
[open]
[-] meta.php
[open]
[-] class-wp-widget-factory.php
[open]
[-] kses.php
[open]
[+]
css
[-] class-wp-taxonomy.php
[open]
[-] canonical.php
[open]
[-] user.php
[open]
[-] ms-default-constants.php
[open]
[-] class-wp-image-editor-imagick.php
[open]
[-] compat.php
[open]
[+]
certificates
[-] version.php
[open]
[-] class-wp-customize-nav-menus.php
[open]
[-] date.php
[open]
[-] pluggable-deprecated.php
[open]
[-] option.php
[open]
[-] class-wp-hook.php
[open]
[-] class-wp-comment-query.php
[open]
[-] post-formats.php
[open]
[-] formatting.php
[open]
[-] class-http.php
[open]
[-] class-wp-matchesmapregex.php
[open]
[-] class-wp-locale.php
[open]
[-] class-wp-http-requests-hooks.php
[open]
[-] nav-menu.php
[open]
[-] ms-load.php
[open]
[-] class-wp-session-tokens.php
[open]
[-] plugin.php
[open]
[-] rest-api.php
[open]
[+]
fonts
[-] category.php
[open]
[-] revision.php
[open]
[-] class-smtp.php
[open]
[-] nav-menu-template.php
[open]
[-] class-wp-post-type.php
[open]
[-] theme.php
[open]
[-] class-snoopy.php
[open]
[-] post.php
[open]
[-] class.wp-scripts.php
[open]
[+]
Text
[-] class-wp-metadata-lazyloader.php
[open]
[-] class-wp-locale-switcher.php
[open]
[-] class-wp-term.php
[open]
[-] category-template.php
[open]
[-] wlwmanifest.xml
[open]
[-] ms-blogs.php
[open]
[-] registration-functions.php
[open]
[-] class-wp-text-diff-renderer-table.php
[open]
[-] class-wp-list-util.php
[open]
[-] class-wp-network-query.php
[open]
[-] http.php
[open]
[-] rss.php
[open]
[+]
IXR
[-] general-template.php
[open]
[-] post-template.php
[open]
[-] query.php
[open]
[-] class.wp-dependencies.php
[open]
[+]
Requests
[-] class-wp-term-query.php
[open]
[-] class-wp-customize-control.php
[open]
[-] ms-files.php
[open]
[-] admin-bar.php
[open]
[-] feed.php
[open]
[-] class-wp-meta-query.php
[open]
[-] class-wp-http-response.php
[open]
[-] class-wp-customize-widgets.php
[open]
[+]
rest-api
[-] rewrite.php
[open]
[-] class-wp-http-requests-response.php
[open]
[-] class-wp-site.php
[open]
[-] class-wp-embed.php
[open]
[-] bookmark.php
[open]
[-] class-wp-error.php
[open]
[-] comment.php
[open]
[-] class-wp-tax-query.php
[open]
[-] class-requests.php
[open]
[-] class-wp-feed-cache.php
[open]
[-] shortcodes.php
[open]
[-] class-wp-simplepie-file.php
[open]
[-] locale.php
[open]
[-] class-wp-ajax-response.php
[open]
[-] class-wp-query.php
[open]
[-] class-json.php
[open]
[-] feed-rdf.php
[open]
[-] class-wp-post.php
[open]
[-] class-wp-network.php
[open]
[-] deprecated.php
[open]
[-] class-wp-customize-manager.php
[open]
[-] l10n.php
[open]
[-] load.php
[open]
[-] vars.php
[open]
[-] class-pop3.php
[open]
[-] default-widgets.php
[open]
[-] functions.wp-scripts.php
[open]
[-] template.php
[open]
[+]
widgets
[-] bookmark-template.php
[open]
[+]
SimplePie
[-] cache.php
[open]
[-] pluggable.php
[open]
[-] class-wp-image-editor-gd.php
[open]
[-] media-template.php
[open]
[-] class-wp-roles.php
[open]
[-] ms-functions.php
[open]
[-] class-wp-theme.php
[open]
[-] ms-default-filters.php
[open]
[-] class-IXR.php
[open]
[+]
theme-compat
[-] class-wp-customize-setting.php
[open]
[-] class-walker-page.php
[open]
[-] class-wp-role.php
[open]
[-] default-filters.php
[open]
[-] class-wp-xmlrpc-server.php
[open]
[-] taxonomy.php
[open]
[-] class-wp-http-encoding.php
[open]
[-] class-simplepie.php
[open]
[-] class-wp-site-query.php
[open]
[-] class-wp-http-ixr-client.php
[open]
[-] class-walker-nav-menu.php
[open]
[-] feed-rss2-comments.php
[open]
[-] embed.php
[open]
[-] template-loader.php
[open]
[-] class-oembed.php
[open]
[-] class-wp-feed-cache-transient.php
[open]
[-] functions.php
[open]
[-] class-walker-category-dropdown.php
[open]
[-] class-wp.php
[open]
[-] class-wp-user-meta-session-tokens.php
[open]
[-] embed-template.php
[open]
[-] default-constants.php
[open]
[-] class-wp-widget.php
[open]
[-] class-wp-image-editor.php
[open]
[-] update.php
[open]
[-] class-wp-http-proxy.php
[open]