protected function newCustomRoute($path, $action, $controller, $module = null) { $callActionController = function () use($action, $controller, $module) { $url_params = array_merge(array_filter([$module, $controller, $action]), func_get_args()); $manager_cotroller = new Controller\Router($module); return $manager_cotroller->get($url_params); }; $this->get($path, $callActionController); }
protected function getTemplate() { if (empty($this->_template)) { $template_path = array_filter([Controller\Router::getModule('underscore')]); $template_path[] = Controller\Router::getController('underscore'); $template_path[] = Controller\Router::getAction('underscore'); $this->setTemplate(implode(DIRECTORY_SEPARATOR, $template_path) . ".tpl"); } return $this->_template; }