template->cfg = $this->cfg; } public function getLuser() { $uid = $this->user->id; return $this->database->get_user($uid); } public function getRootDir() { $dir = dirname($this->reflection->fileName); foreach(explode(':', $this->name) as $dummy) $dir = dirname($dir); return $dir; } public function getTemplateDir() { $presenter = strtr($this->name, ':', '/'); return "$this->rootDir/templates/$presenter"; } public function formatLayoutTemplateFiles() { $layout = $this->layout ? $this->layout : 'layout'; // die("formatLayoutTemplateFiles() = $this->templateDir/@$layout.latte"); return [ "$this->templateDir/@$layout.latte", "$this->rootDir/templates/@$layout.latte", ]; } public function formatTemplateFiles() { // die("formatTemplateFiles() = $this->templateDir/$this->view.latte"); $nameparts = explode(':', $this->name); $lastname = array_pop($nameparts); return [ "$this->templateDir/$this->view.latte", "$this->rootDir/templates/$lastname/$this->view.latte", ]; } }