- This summary
- +380.000 other summaries
- A unique study tool
- A rehearsal system for this summary
- Studycoaching with videos
A snapshot of the summary - Zend Framework 2 Documentation
What is the Service Locator Design Pattern?The Service Locator Design Pattern is a design pattern which encapsulates the process involved in obtaining a service with a strong abstraction layer.
Which component implements the Service Locator Design Pattern?Zend\ServiceManager
Which functionalities does Zend\ServiceManager have in addition to the ones described in the ServiceLocatorInterface?- Service registration
- Lazy-loaded service objects
- Service factories
- Service aliasing
- Abstract factories
Which listener handles the loading of the Zend\ServiceManager configuration?Zend\ModuleManager\Listener\ServiceListener
Which interface can be implemented to provide configuration to the framework?Zend\ModuleManager\Feature\ServiceProviderInterface
Which are the six valid keys in the service_manager configuration element?1. abstract_factories
What are the two disadvantages of closures in configuration files?1. You cannot use the caching mechanism for configuration files.
2. All closures are read at module loading time in stead of factory methods.
What is the best practise for service names?Use the FQCN
1.1 Delegator Service factories
What interface do you use when you want to wrap a service in a decorator?The Zend\ServiceManager\DelegatorFactoryInterface
Name one purpose of wrapping a service in a decorator?For AOP programming