diff --git a/src/View/HelperConfig.php b/src/View/HelperConfig.php index 48368227..92dc0698 100644 --- a/src/View/HelperConfig.php +++ b/src/View/HelperConfig.php @@ -33,10 +33,14 @@ public function configureServiceManager(ServiceManager $serviceManager) { $config = $this->toArray(); + if (method_exists($serviceManager, 'configure')) { + $serviceManager->configure($config); + return $serviceManager; + } + foreach ($config['factories'] as $service => $factory) { $serviceManager->setFactory($service, $factory); } - foreach ($config['aliases'] as $alias => $target) { $serviceManager->setAlias($alias, $target); }