/** * Save user session and render the final layout template */ public function send() { \Core\Session::save(); headers_sent() or header('Content-Type: text/html; charset=utf-8'); $layout = new \Core\View($this->template); $layout->set((array) $this); print $layout; $layout = NULL; if (config()->debug_mode) { print new \Core\View('System/Debug'); } }