zf2 ServiceManager vs ServiceLocator
问题 I am learning zf2, reading docs, tutorials etc from the web. Now I am confused regarding Zend\ServiceManager\ServiceManagerAwareInterface.php and Zend\ServiceManager\ServiceLocatorAwareInterface.php . Also in some place (like controller) I use $this->getServiceLocator() to fetch the ServiceManager object while at some other places we use ->getServiceManager() and it also returns the same ServiceManager object. 回答1: The Locator is the interface. The design of Zend Framework 2 is done with