Google News
logo
Zend framework - Interview Questions
What is ServiceManager in Zend framework?
The Service Locator design pattern is implemented by the Zend\ServiceManager component. The Service Locator is a service/object locator, tasked with retrieving other objects. Following is the Zend\ServiceManager\ServiceLocatorInterface API :
namespace Zend\ServiceManager;

interface ServiceLocatorInterface
{
    public function get($name);
    public function has($name);
}
* has($name), tests whether the ServiceManager has a named service;
* get($name), retrieves a service by the given name.
Advertisement