add invoked service loading logic in Westdc\Service\ServiceManager

This commit is contained in:
Jianxuan Li 2014-12-18 23:38:46 +08:00
parent 1ab6b8bbf3
commit 16e8a7acae
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,13 @@ class ServiceManager {
{ {
$this->serviceManager = new Zend_ServiceManager(); $this->serviceManager = new Zend_ServiceManager();
$this->serviceManager->addAbstractFactory(new ServiceFactory); $this->serviceManager->addAbstractFactory(new ServiceFactory);
$configService = $this->serviceManager->get('ConfigService');
$invoked_services = $configService->get('service.invoked.ini');
foreach($invoked_services as $k=>$v) {
$this->serviceManager->setInvokableClass($k, $v);
}
} }
public function addKey($key,$value = "") public function addKey($key,$value = "")