/** * start - renders applicaiton and routes to correct template, writes content to output buffer * * @access public static * @return void */ public function start() { $config = new config(); $login = new login(session::getSID()); $frontController = frontcontroller::getInstance(ROOT); if ($login->logged_in() === false) { if (isset($_GET['export']) === true) { ob_start(); $frontController->run(); $toRender = ob_get_clean(); } else { ob_start(); include 'includes/templates/' . TEMPLATE . '/login.php'; $toRender = ob_get_clean(); } } else { ob_start(); include 'includes/templates/' . TEMPLATE . '/content.php'; $toRender = ob_get_clean(); } $this->render($toRender); }