3 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
11 * Description of ControllerRouter
15 class ControllerRouter
18 * xxx todo: error handling
22 $actionParam = _get("action");
23 $paramParts = explode("!", $actionParam);
24 $controller = $paramParts[0];
25 $action = $paramParts[1];
27 $controllerDir = controller_dir($controller);
28 $controllerFile = $controllerDir . "/controller.php";
29 require_once($controllerFile);
30 $controllerClassName = "Controller_$controller";
31 $controllerInstance = new $controllerClassName();
33 $actionRouter = new ActionRouter(
39 $actionRouter->route();