/** * start a new browser app * * @param array $config app config * * @return \bolt\browser object */ public static function start($config = []) { $req = b::param('request', false, $config); $res = b::param('response', false, $config); // request $br = new browser($req, $res); // create a settings bucket b::settings('browser', []); // load any routes if (b::param('loadRoutes', true, $config) !== false) { b::browser('route\\collectFromControllers'); } // by default don't run if (b::param('run', false, $config) !== false) { $br->run(); } // return the browser return $br; }