private function registerExtension(\Twig_Environment $twig)
    {
        $extensions = $this->getExtensions();
        if (count($extensions)) {
            foreach ($extensions as $key => $extension) {
                $this->load($twig, $key, $extension);
            }
        }
    }