The Hidden Perils of Craft CMS Plugin Service Classes
When writing a Craft plugin, you should be very selective about what you put in your service classes. If you’re developing a very simple Craft plugin, chances are you won’t need to worry about its public footprint. For more complex projects, the techniques described in this article will make your plugin easier to test, and ensure that it is only used in the manner you originally intended. Stephen Lewis