protected function generateUrl($path) { $url = $path; if ($this->hostPrefix) { // url should start with a / $url = $this->hostPrefix . $url; } return $url; }