/** * Handle the request */ public static function handle() { if (empty(self::$request)) { self::$request = 'default'; } $req = array('page' => self::$request, 'url' => Config::instance()->get('baseurl') . '/' . self::$request, 'time' => $GLOBALS['numbat_start_time'], 'error' => false); try { $item = new Item(self::$request); Views::load($item, $req); } catch (NumbatDBError $e) { numbat_primative_die($e->getMessage(), 'db', $e->getConfig()); } catch (Numbat404 $e) { $req['error'] = true; $item = new Item('error/404'); Views::load($item, $req); } }