/** * The HTTP object for the site * * @return HttpSocket */ public function http() { if (!empty($this->http)) { return $this->http; } $url = $this->site(); $this->http =& new HttpSocket(); $this->http->configUri($url); if ($this->http->config['request']['uri']['scheme'] != 'http') { $this->http->config['scheme'] = $this->http->config['request']['uri']['scheme']; } return $this->http; }
/** * Update uri * * @param string $url */ public function updateURI($url = null) { if (!empty($url)) { $this->sock->configUri($this->parseUri($url)); } }