public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $options = $serviceLocator->get('HtSettingsModule\Options\ModuleOptions');
        $settingsService = new SettingsService(
            $options,
            $serviceLocator->get('HtSettingsModule_SettingsMapper'),
            $serviceLocator->get('HtSettingsModule\Service\NamespaceHydratorProvider')
        );
        if ($options->getCacheOptions()->isEnabled()) {
            $settingsService->setCacheManager($serviceLocator->get('HtSettingsModule\Service\CacheManager'));
        }

        return $settingsService;
    }