Here’s an article from Torque written by Josh Pollock which I thought you might find of interest.

A common design pattern for WordPress plugins is to have one “main class” that implements the singleton pattern. This pattern is called the “God Class” and it loads all of the other classes the plugin needs as well as instances of those classes in properties of that class. I’ve utilized this anti-pattern, because it accomplishes …
The post Using Automatic Dependency Injection For WordPress Development appeared first on Torque.

To read more head to https://torquemag.io/2017/01/using-automatic-dependency-injection-wordpress-development/

Till next time,
D