Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
6 / 6 |
| ToolsServiceFactory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
4 | |
100.00% |
6 / 6 |
| createService | |
100.00% |
1 / 1 |
4 | |
100.00% |
6 / 6 |
|||
| <?php | |
| namespace AssetsBundle\Factory; | |
| class ToolsServiceFactory implements \Zend\ServiceManager\FactoryInterface | |
| { | |
| /** | |
| * @see \Zend\ServiceManager\FactoryInterface::createService() | |
| * @param \Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator | |
| * @return \AssetsBundle\Service\ToolsService | |
| */ | |
| public function createService(\Zend\ServiceManager\ServiceLocatorInterface $oServiceLocator) | |
| { | |
| $oToolsService = new \AssetsBundle\Service\ToolsService(); | |
| $oToolsService | |
| ->setAssetsBundleService($oServiceLocator->get('AssetsBundleService')) | |
| ->setMvcEvent(($oMvcEvent = $oServiceLocator->get('Application')->getMvcEvent()) ? clone $oMvcEvent : new \Zend\Mvc\MvcEvent()); | |
| if ($oServiceLocator->has('console') && ($oConsole = $oServiceLocator->get('console')) instanceof \Zend\Console\Adapter\AdapterInterface) { | |
| $oToolsService->setConsole($oConsole); | |
| } | |
| return $oToolsService; | |
| } | |
| } |