public function setTemplatePath($path, \Twig_Environment $twig = null, $extensions = [])
    {
        $this->paths['templates'] = $path;

        if (is_null($twig) === true) {
            $loader = new \Twig_Loader_Filesystem($path);

            $twig = new \Twig_Environment($loader);
        }

        $twig->setExtensions($extensions);

        $this->injector->share($twig);

        return $this;
    }