I just made a pretty small change in the way King23 works with its routing,
while it is fully backward compatible, it now allows you to add sub-routers to organise your routes a bit. So you dont end up having a list of thousand routes below eachother (and executionwise it means less iterations, more speed, if you use subrouters, instead of declaring all routes in a flat list).
It also allows you fancy stuff like extending the router class, overloading the usual router methods by own implementations that only run for a specific subroute… use your imagination of what you can do with this =)
A very simple usage example:
<?php // get instace of the mainrouter $router = King23_Router::getInstance(); // get a non singleton instance of King23_Router $subrouter = new King23_Router(); // declare a few routes at the subrouter $subrouter->addRoute("one/", "My_View", "one", array("param1", "param2")); $subrouter->addRoute("two/", "My_View", "two", array("param1", "param2")); $subrouter->addRoute("/", "My_View", "index"); // add the subrouter with a route to the main router $router->addRouter("/projects/", $projects); // add regular routes to the main router $router->addRoute("/", "Devedge_Static_View", "index", array());
One more thing, this is currently only available in git, not in any release yet.