public static function createService(Application $app, $serviceName, $pathName, $optionsName)
    {
        $app[$optionsName] = array();
        $app[$serviceName] = $app->share(
            function () use (
                $app,
                $serviceName,
                $pathName,
                $optionsName
                ) {
                $app[$optionsName] = array_merge(
                    array(
                        'cache_path' => '',
                        'debug' => $app['debug'],
                        'prefix' => $app['debug'] ? 'dev.' : 'prod.'
                    ),
                    $app[$optionsName]
                );

                if (false === isset($app[$optionsName]['loaders'])) {
                    $options = $app[$optionsName];

                    $options['loaders'] = array(
                        'KevinGH\Wisdom\Loader\INI',
                        'KevinGH\Wisdom\Loader\JSON'
                    );

                    if (class_exists('Symfony\Component\Yaml\Yaml')) {
                        $options['loaders'][] = 'KevinGH\Wisdom\Loader\YAML';
                    }

                    $app[$optionsName] = $options;
                }

                $wisdom = new Wisdom ($app[$pathName]);

                $wisdom->setCache($app[$optionsName]['cache_path']);
                $wisdom->setDebug($app[$optionsName]['debug']);
                $wisdom->setPrefix($app[$optionsName]['prefix']);
                $wisdom->setValues($app);

                foreach ((array) $app[$optionsName]['loaders'] as $class) {
                    $wisdom->addLoader(new $class);
                }

                return $wisdom;
            }
        );
    }