@tsteur opened this Issue on November 4th 2014 Owner

Similar to the Common class the Piwik\Piwik class class is a huge collection of random methods that actually do not belong in this class. In #6585 we will move methods that are related to user or user permissions into different class(es). We should do the same for the remaining methods within the Piwik class. For example we could move all event related methods such as postEvent or addAction into a class named eg Events. The Piwik class also contains math and request related methods. Goal is to move most if not all methods into classes they actually belong to.

It probably makes sense to have a look in Piwik\Common as well to see if methods can be moved to some of those newly classes as well. For example this class also contains math and request related methods. It also contains many database related methods etc. (Currently there are > 1100 lines in this class)

By having smaller classes we can define useful interfaces and let plugins change parts of it and we will end up having cleaner code that is less confusing for plugin developers and new core developers.

At the latest this change should be made for Piwik 3.0 but the sooner the better.

Powered by GitHub Issue Mirror