Exemplo n.º 1
0
 private function getConfigFile($part)
 {
     if ($part) {
         return Project::getDir('app/config') . $part . '.xml';
     }
     return Project::getDir('app/config') . 'config.xml';
 }
Exemplo n.º 2
0
 public function renderTemplate($templatePath, array $params = array())
 {
     $templatePath = Project::getDir('app/views') . $templatePath;
     extract($params);
     if (!file_exists($templatePath)) {
         throw new \Exception('There are no template with path "' . $templatePath . '"  to render.');
     }
     include $templatePath;
 }