/** * Generates an URL based on the current URL. * * @see Controller::getPathFor() * @param array $parameters * @return string */ public function getUrlFor($routingData = array(), $parameters = array()) { $port = $this->request->getPort(); $portStr = $port != '80' ? ':' . $port : ''; return $this->request->getScheme() . '://' . $this->request->getHost() . $portStr . $this->getPathFor($routingData, $parameters); }
/** * Create URL based on passed $controller and $arguments * * @see functionPath */ public function functionUrl($controllerAction, $arguments = array(), $ajax = false) { $port = $this->request->getPort(); $portStr = $port != '80' ? ':' . $port : ''; return $this->request->getScheme() . '://' . $this->request->getHost() . $portStr . $this->functionPath($controllerAction, $arguments, $ajax); }