コード例 #1
0
ファイル: Controller.php プロジェクト: easselin/orchestra
 /**
  * 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);
 }
コード例 #2
0
 /**
  * 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);
 }