public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        if (!isset($config['cache_manager'])) {
            throw new Exception\RuntimeException(
                'No cache manager config found.'
            );
        }
        $options = $config['cache_manager'];
        $manager = new CacheManager;
        foreach ($options as $key => $value) {
            if ($manager->hasCacheTemplate($key)) {
                $manager->setTemplateOptions($key, $value);
            } else {
                $manager->setCacheTemplate($key, $value);
            }
        }
        return $manager;
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        if (!isset($config['cache_manager'])) {
            throw new Exception\RuntimeException(
                'No cache manager config found.'
            );
        }
        $options = $config['cache_manager'];
        $manager = new CacheManager;
        foreach ($options as $key => $value) {
            if ($manager->hasCacheTemplate($key)) {
                $manager->setTemplateOptions($key, $value);
            } else {
                $manager->setCacheTemplate($key, $value);
            }
        }
        return $manager;
    }
public function createService ( ServiceLocatorInterface $ serviceLocator ) { $ config = $ serviceLocator -> get ( 'Config' ) ; if ( ! isset ( $ config [ 'cache_manager' ] ) ) { throw new Exception \ RuntimeException ( 'No cache manager config found.' ) ; } $ options = $ config [ 'cache_manager' ] ; $ manager = new CacheManager ; foreach ( $ options as $ key => $ value ) { if ( $ manager -> hasCacheTemplate ( $ key ) ) { $ manager -> setTemplateOptions ( $ key , $ value ) ; } else { $ manager -> setCacheTemplate ( $ key , $ value ) ; } } return $ manager ; }
Create cache manager service

@param ServiceLocatorInterface $serviceLocator
@return CacheManager
@throws Exception\RuntimeException
Create cache manager service