public function onBeforeExecute() { $this->template = \MvcEngine\Templates\TemplateFactory::get('php'); $this->template->setTemplateFile($this->template->getTemplatePathByProjectControllerAction(Registry::get('routeData'))); }