public function register(SilexApp $app) {
        $app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, SilexApp $app) {
            $class = $this->getServiceConfig()->getProviderClass();
            $twig->addExtension(new $class);

            return $twig;
        }));
    }