public function start() { $controller_name = $this->config['default_controller']; $action_name = "invoke"; if (!empty($_GET['controller'])) { $controller_name = $_GET['controller']; } if (!empty($_GET['action'])) { $action_name = $_GET['action']; } $controller_file = "controller_" . strtolower($controller_name) . '.php'; $controller_path = "controllers/" . $controller_file; if (file_exists($controller_path)) { include "controllers/" . $controller_file; } else { Lithium::ErrorPage404(); } $controller = new $controller_name(); $action = $action_name; if (method_exists($controller, $action)) { $controller->{$action}(); } else { Lithium::ErrorPage404(); } }