Пример #1
0
 public function html()
 {
     $this->content = \jmvc\View::render($this->args['context'], $this->args);
 }
Пример #2
0
 /**
  * Display a 404 error to the user. Stops execution of the script.
  * @param bool $template
  * @return void
  */
 public static function do404()
 {
     // clear the output buffer
     while (ob_get_length()) {
         ob_end_clean();
     }
     header("HTTP/1.0 404 Not Found");
     echo \jmvc\View::render(array('controller' => 'template', 'view' => \jmvc\View::$CONTEXT_DEFAULTS['template'], 'site' => \jmvc\View::$CONTEXT_DEFAULTS['site'], 'template' => \jmvc\View::$CONTEXT_DEFAULTS['template']), array('context' => array('controller' => 'template', 'view' => 'do404')));
     exit;
 }