/**
  * Override configure() to validate service instances.
  *
  * If an instance passed in the `services` configuration is invalid for the
  * plugin manager, this method will raise an InvalidServiceException.
  *
  * {@inheritDoc}
  * @throws InvalidServiceException
  */
 public function configure(array $config)
 {
     if (isset($config['services'])) {
         foreach ($config['services'] as $service) {
             $this->validate($service);
         }
     }
     parent::configure($config);
     return $this;
 }
Esempio n. 2
0
 /**
  * Configure service manager
  *
  * @param ServiceManager $serviceManager
  * @return ServiceManager Returns the updated service manager instance.
  */
 public function configureServiceManager(ServiceManager $serviceManager)
 {
     return $serviceManager->configure($this->config);
 }