/** * Redirect to a different route * @param String $routeName Name of the route * @param Array $params $params for the route path * @return \core\WFEResponse */ public static function redirect($routeName, $params = array()) { $route = WFERoute::get($routeName); header('Location: ' . $route->injectParams($params)); return new WFEResponse(); }
public static function link($array, $smarty) { $route = WFERoute::get($array['route']); $url = $route->injectParams($array['params']); return $url; }
/** * Initiliaze request for GET method */ private function initGET() { if (!isset($_GET['routeName'])) { $route = WFERoute::getByPath($this->getURI()); } else { $route = WFERoute::get($_GET['routeName']); } $this->route = $route; if (isset($_GET['routeParams'])) { if (is_array($_GET['routeParams'])) { $this->params = $_GET['routeParams']; } } }