From 16e8a7acae449199f312e12f6b10c3483169e977 Mon Sep 17 00:00:00 2001 From: Jianxuan Li Date: Thu, 18 Dec 2014 23:38:46 +0800 Subject: [PATCH] add invoked service loading logic in Westdc\Service\ServiceManager --- Westdc/Service/ServiceManager.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Westdc/Service/ServiceManager.php b/Westdc/Service/ServiceManager.php index 1906b1a..558c090 100644 --- a/Westdc/Service/ServiceManager.php +++ b/Westdc/Service/ServiceManager.php @@ -18,6 +18,13 @@ class ServiceManager { { $this->serviceManager = new Zend_ServiceManager(); $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 = "")