<?php

namespace Ingot\Provider;

use Ingot\Normalizer\NetGroupNormalizer;
use Silex\Application;

class TackerServiceProvider implements \Silex\ServiceProviderInterface
{
    public function register(Application $app)
    {
        $app['config.normalizer'] = $app->extend('config.normalizer', function ($normalizer, $app) {
            $normalizer->add(new NetGroupNormalizer($app['config.locator']));

            return $normalizer;
        });

        // Needed defaults for caching of configs.
        $app['cache_dir'] = $app['root_dir'] . '/var/cache/' . $app['env'];
        $app['config.cache_dir'] = $app['cache_dir'] . '/config';
    }

    public function boot(Application $app)
    {
    }
}
