WP_HTTP_IXR_Client::__construct()
Method of the class: WP_HTTP_IXR_Client{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_HTTP_IXR_Client = new WP_HTTP_IXR_Client(); $WP_HTTP_IXR_Client->__construct( $server, $path, $port, $timeout );
- $server(string) (required)
- -
- $path(string|false)
- -
Default: false - $port(int|false)
- -
Default: false - $timeout(int)
- -
Default: 15
WP_HTTP_IXR_Client::__construct() WP HTTP IXR Client:: construct code WP 6.7.1
public function __construct( $server, $path = false, $port = false, $timeout = 15 ) { if ( ! $path ) { // Assume we have been given a URL instead. $bits = parse_url( $server ); $this->scheme = $bits['scheme']; $this->server = $bits['host']; $this->port = isset( $bits['port'] ) ? $bits['port'] : $port; $this->path = ! empty( $bits['path'] ) ? $bits['path'] : '/'; // Make absolutely sure we have a path. if ( ! $this->path ) { $this->path = '/'; } if ( ! empty( $bits['query'] ) ) { $this->path .= '?' . $bits['query']; } } else { $this->scheme = 'http'; $this->server = $server; $this->path = $path; $this->port = $port; } $this->useragent = 'The Incutio XML-RPC PHP Library'; $this->timeout = $timeout; }