コード例 #1
0
ファイル: Exception.php プロジェクト: mirdware/scoop
 public function handler()
 {
     foreach ($this->headers as &$header) {
         header($header);
     }
     try {
         $view = new \Scoop\View($this->path . $this->statusCode);
         $output = $view->set(array('ex' => $this, 'title' => $this->title))->render();
     } catch (\Exception $ex) {
         $output = $this->getMessage();
     }
     exit($output);
 }
コード例 #2
0
ファイル: Home.php プロジェクト: mirdware/scoop
 public function get()
 {
     $view = new \Scoop\View('home');
     $index = rand(0, count($this->quotes) - 1);
     return $view->set('title', 'MirdWare')->set($this->quotes[$index]);
 }