IXR_Client::__construct
PHP5 constructor.
Method of the class: IXR_Client{}
No Hooks.
Returns
null. Nothing (null).
Usage
$IXR_Client = new IXR_Client(); $IXR_Client->__construct( $server, $path, $port, $timeout );
- $server(required)
- .
- $path
- .
Default:false - $port
- .
Default:80 - $timeout
- .
Default:15
IXR_Client::__construct() IXR Client:: construct code WP 7.0
function __construct( $server, $path = false, $port = 80, $timeout = 15 )
{
if (!$path) {
// Assume we have been given a URL instead
$bits = parse_url($server);
$this->server = $bits['host'] ?? '';
$this->port = $bits['port'] ?? 80;
$this->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->server = $server;
$this->path = $path;
$this->port = $port;
}
$this->useragent = 'The Incutio XML-RPC PHP Library';
$this->timeout = $timeout;
}