Wikia/app — pull request #445 by owend (2013-02-19 23:22:17+00:00)
Title: add simple Routing support to WikiaApp->registerController

Don't merge yet, just making this available for comments. This uses the "options" parameter of registerController to set up a list of methods to override based on global var or skin name. So, instead of calling Controller::foo it would call NewController::foo (if you want to override everything, you can use * for the method name). See code comments for more detail.

There is one feature mentioned in the comments which is not implemented yet because it may not be necessary. There may not be any need to use "before" routing since the router currently calls the new method first anyway and if you still want to forward to the old method you can do that yourself in the new method. Also on the TODO list is to refactor everything that uses the current dispatcher AfterExecute hooks to use this instead.