You are retrieving the Service Locator!

I used to like coding websites using Zend Framework in PHP. Of course, that is from the good old days of L.A.M.P. (Linux Apache MySql PHP) and before the world got so M.E.A.N (Mongo Ember Angular Node.js). Did I get that right?

Now I have a pesky error in Zend Framework 2 that I can’t seem to get rid of: “You are retrieving the Service Locator from within the Class.” I feel like the computer is speaking about something else but I have no idea what! But whoever came up with the idea of phrasing an error in this way must have been up to something. Blame the new emphasis on Service Oriented Architecture (S.O.A.) I guess.

Here is a very helpful link on Stack Overflow that explains what to do about this problem: https://stackoverflow.com/questions/35933113/php-deprecated-you-are-retrieving-the-service-locator-from-within-the-class-zft