// without setup, but there's no reason these should eventually not be // part of the database in the sections table. Kiki does support that // already, after all, just the CMS is lacking. $controller = Controller::factory($moduleMatches[1]); $controller->setObjectId($moduleMatches[2]); } else { // For all static files $controller = Controller::factory('Kiki'); $controller->setObjectId($matches[1]); } } else { if (preg_match('#^/storage/([^\\.]+)\\.([^x]+)x([^\\.]+)\\.((c?))?#', $requestPath, $matches)) { $controller = Controller::factory('Thumbnails'); $controller->setObjectId($matches); } else { if (!($controller = Router::findPage($requestPath)) && !($controller = Router::findSection($requestPath))) { // Nothing? 404. // // @todo Add an alias controller here, functioning quite like the // tinyURL controller but then with database stored URI aliases. // // The CMS module (and possibly the site itself when an administrator is // logged in) should then warn about aliases that conflict with // top-level pages (and vice versa), and possibly tinyURLs but those // might need a technical solution beyond risk management due to their // automatic generation. $controller = new Controller\NotFound404(); } } } }