joomla/joomla-cms — pull request #5234 by Hackwar (2014-11-28 09:41:28+00:00)
Title: Updating JComponentRouterRulesInterface

I have to excuse myself, but the original interface that I proposed was sub-optimal. I would like to propose this change. The initial idea was to send in the router object each time the method is called and that the rules might even be called statically, but that idea wasn't very good. Instead, the rules are created as objects now and tied to the respective router. The router itself is handed over to the rule when the rule object is instantiated and can then be stored in a member of the object. This allows things to be set up in the constructor, like the lookup table for the menu item when finding out the right Itemid in the preprocess method.

Please review this code and merge it for Joomla 3.4.0. Right now, the code could still be changed.