-
Book Overview & Buying
-
Table Of Contents
Zend Framework 2 Cookbook
By :
One of the biggest features of Zend Framework 2 is the ServiceManager
, and its influence in the framework can be seen from the initial bootstrap of our application. We don't need a reason to explain why this recipe goes deeper in this topic, do we?
Again a Zend Framework 2 skeleton application should be running to make the full use of our examples in this recipe.
Before we continue let's get the difference between a service and a model. Although the definition of a service is sometimes a judgment call, it can be safely assumed that a service is a class between the controller and the model, which hides all the nasty logic from the controller, for example, checking the authentication or calling a method in a model. Another thing that is different is that the service in our case will be managed by the ServiceManager, and therefore, can be called from any controller (and other service) in our application.
Services are a great way of making sure our functionality...
Change the font size
Change margin width
Change background colour