public static function make($options = false) { self::getConfigs(); self::setOptions($options); self::setViewPath(); $content = self::makeAction(); if (self::$layout) { require_once self::$viewPath . '/layout.html'; } else { Response::send($content); } }
protected static function inDisplay($message, $level) { Response::send("<div>" . "<h4>{$level}</h4>" . "<blockquote>{$message}</blockquote>" . "</div>"); }
/** * Вызов метода (действия) из класса контроллера */ protected function callAction() { if (is_callable(array($this->controller, $this->action)) === FALSE) { throw new \Exception('Аction not defined'); } Response::send(call_user_func(array($this->controller, $this->action))); }