* new: added the `Client::setTimeout` method, meant to replace usage of the `$timeout` argument in calls to `send`
and `multicall`
+* new: method `Client::getUrl()`
+
* new: method `Server::setDispatchMap()`
* new: it is now possible to inject a custom logger into helper classes `Charset`, `Http`, `XMLParser`, inching a step
/// @todo: do all the ones below need to be public?
+ /**
+ * @var string
+ * @internal use getUrl
+ */
public $method = 'http';
+ /**
+ * @var string
+ * @internal use getUrl
+ */
public $server;
+ /**
+ * @var int
+ * @internal use getUrl
+ */
public $port = 0;
+ /**
+ * @var string
+ * @internal use getUrl
+ */
public $path;
/**
return $this;
}
+ /**
+ * @return string
+ */
+ public function getUrl()
+ {
+ $url = $this->method . '://' . $this->server;
+ if (($this->port = 80 && in_array($this->method, array('http', 'http10', 'http11', 'h2c'))) &&
+ ($this->port = 443 && in_array($this->method, array('https', 'h2')))) {
+ return $url . $this->path;
+ } else {
+ return $url . ':' . $this->port . $this->path;
+ }
+ }
+
/**
* Send an xml-rpc request to the server.
*