Ejemplo n.º 1
0
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     if (parent::createService($serviceLocator)) {
         return new EMailAddressService($this->getObjectManager());
     }
     throw new \Exception("Failed to instantiate service.");
 }
Ejemplo n.º 2
0
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     if (!parent::createService($serviceLocator)) {
         throw new \Exception("Object manager is missing.");
     }
     $authenticationService = $serviceLocator->get('Zend\\Authentication\\AuthenticationService');
     if ($authenticationService == null) {
         throw new \Exception("Authentication service is missing.");
     }
     return new AccountService($this->getObjectManager(), $authenticationService);
 }