/** * run * * Run the app * * @access public * @return void */ public function run() { // Setup our default error route responders $this->setup_error_routes(); // To always be RESTful, create a last-hit route responder to respond in our designated format ALWAYS Router::route(function ($request, $response, $service, $matches) { // ALWAYS respond with our formatting function Router::app()->api_respond(); }); // Finally, call "dispatch" to have our App's Router route the request appropriately Router::dispatch(substr($_SERVER['REQUEST_URI'], strlen(rtrim($this->config['app-meta']['base_url'], '/')))); }