/** * Sets server url (scheme and host-related stuff without request URI) * * E.g. http://www.example.com * * @param string $serverUrl server URL to set (only * scheme and host) * @throws \Zend\Uri\Exception if invalid server URL * @return \Zend\View\Helper\Navigation\Sitemap fluent interface, returns * self */ public function setServerUrl($serverUrl) { $uri = new \Zend\Uri\Url($serverUrl); $uri->setFragment(''); $uri->setPath(''); $uri->setQuery(''); if ($uri->isValid()) { $this->_serverUrl = $uri->generate(); } else { $e = new \Zend\Uri\Exception(sprintf('Invalid server URL: "%s"', $serverUrl)); $e->setView($this->view); throw $e; } return $this; }