private function route() { // We can't count on user to set routes, so let's make sure something's there if (!isset(Config::$config[$this->data['app']['name']]['routes'])) { Config::$config[$this->data['app']['name']]['routes'] = array(); } // We have to build the routes to include the app name before the paths, this includes rewriting keys // BECUASE foo/bar/ should really be appname/foo/bar/ $new_routes = array(); foreach (Config::$config[$this->data['app']['name']]['routes'] as $k => $v) { $new_routes[$this->data['app']['name'] . '/' . $k] = $this->app_name . '/' . $v; } Config::$config[$this->data['app']['name']]['routes'] = $new_routes; Router::uri_rewrite(Config::$config[$this->data['app']['name']]['routes']); }