/** * Returns the baseurl with the optional * part, which will be appended * * @param string $id * @param array $arguments * @return string */ public function routeUrl($id, $arguments = array()) { return UrlHelper::getRouteUrl($id, $arguments); }
/** * @param array $parts * @return string */ private function parseUrl($parts) { $urlParts = Router::getInstance()->getRouteUrlParts(); for ($i = 0, $len = count($parts); $i < $len; $i++) { $parts[$parts[$i]->getName()] = (string) $parts[$i]; unset($parts[$i]); } return UrlHelper::getBaseUrl(implode('/', array_merge($urlParts, $parts))); }
/** * Returns the base url * * @param string|array $parts * @return string */ public function getBaseUrl($parts = "") { return UrlHelper::getBaseUrl($parts); }
/** * Sets the parent route and automatically * updates the url so it will be combined * recusively with the ones in the parent * routes * * @param Route $route * @return self */ public function setParent(Route &$route) { $this->parent = $route; $current = $this->parent; $fromTmp = array(); while (!is_null($current)) { $fromTmp[] = $current->getFrom(); $current = $current->getParent(); } $fromTmp = array_reverse($fromTmp); $fromTmp = implode('/', $fromTmp); $fromTmp = UrlHelper::cleanUrl($fromTmp); $this->fullFrom = UrlHelper::cleanUrl($fromTmp . $this->fullFrom); return $this; }
/** * Returns the base url * * @param string $value * @return string */ public static function execURL($value) { return UrlHelper::getBaseUrl($value); }