Example #1
0
 public function run()
 {
     $request = Request::createFromGlobals();
     $pathInfo = $request->getPathInfo();
     $router = new Router();
     $routeMappings = $router->getRouteMappings();
     if (isset($routeMappings[$pathInfo])) {
         $destRoute = $routeMappings[$pathInfo];
         $pathArgs = explode('/', $destRoute);
         if (count($pathArgs) > 1) {
             $controller = $this->create_instance($pathArgs[0], $pathArgs[1]);
         }
     }
     $controller = new \controller\StandardController\StandardController();
     $controller->index();
 }