Beispiel #1
0
 public function getUrl($uri = null, $params = array(), $forceKey = false, $locale = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $useKey = (bool) $request->useApplicationKey();
     if (!$this->getDomain()) {
         $forceKey = true;
     }
     if ($forceKey) {
         $request->useApplicationKey(true);
         $url = Core_Model_Url::create($uri, $params, $locale);
         $request->useApplicationKey($useKey);
     } else {
         $url = Core_Model_Url::createCustom('http://' . $this->getDomain(), $uri, $params, $locale);
     }
     return $url;
 }
 public function getUrl($url = '', array $params = array(), $locale = null, $forceKey = false)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     if (!$this->getDomain()) {
         $forceKey = true;
     }
     if ($forceKey) {
         $use_key = $request->useApplicationKey();
         $request->useApplicationKey(true);
         $url = Core_Model_Url::create($url, $params, $locale);
         $request->useApplicationKey($use_key);
     } else {
         $url = Core_Model_Url::createCustom('http://' . $this->getDomain(), $url, $params, $locale);
     }
     if (substr($url, strlen($url) - 1, 1) != "/") {
         $url .= "/";
     }
     return $url;
 }