/** * Redirect to * * @access public * @param string $url * @param bool $rewrite */ public static function redirect($url, $rewrite = true) { if ($rewrite) { // TODO: I don't actually know why there is a try/catch around this? try { $url = \Skeleton\Core\Util::rewrite_reverse($url); } catch (\Exception $e) { } } header('Location: ' . $url); echo 'Redirecting to : ' . $url; exit; }
/** * Filter rewrite * * @param string $url * @return string $output */ public function rewrite_filter(\Twig_Environment $env, $url) { if (class_exists('\\Skeleton\\Core\\Util')) { return \Skeleton\Core\Util::rewrite_reverse($url); } return $url; }
/** * Render a template * * @access public * @param string $template * @return string $rendered_template */ public function render($template) { return \Skeleton\Core\Util::rewrite_reverse_html($this->template->render($template)); }