zendframework2 如何在自定义类里使用ServiceManager
在controller里使用servicemanager很简单,我们可以这样做$sm = $this->getServiceLocator()在自定义类中,我们可以这么做,实现 ServiceLocatorAwareInterface接口php<?phpnamespace My;use Zend\ServiceManager\ServiceLocatorAw
原创
2014-12-24 15:49:05 ·
254 阅读 ·
0 评论