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); }
public function get() { $view = new \Scoop\View('home'); $index = rand(0, count($this->quotes) - 1); return $view->set('title', 'MirdWare')->set($this->quotes[$index]); }