Exemplo n.º 1
0
 public function displayTemplate($file, $params = array())
 {
     $template = new TemplatePage($file);
     $template->assign($params);
     $result = $template->display();
     App::setTranslation('templates/' . $this->file);
     return $result;
 }
Exemplo n.º 2
0
 public static function run()
 {
     // Подключение переводов
     App::setTranslation('controllers/' . App::getController());
     // Подготовка контроллера
     static::init();
     // Запуск необходимого для обработки запроса action - метода
     $method = 'action' . App::getAction();
     if (method_exists(get_called_class(), $method)) {
         return static::$method();
     } else {
         return static::actionDefault();
     }
 }