protected function getUserDefinedGlobals()
    {
        if (file_exists(realpath(__DIR__.'/../../../../config/twig.php'))) {
            $this->config = require realpath(__DIR__.'/../../../../config/twig.php');
        } elseif (file_exists(realpath(__DIR__.'/../config/twig.php'))) {
            $this->config = require realpath(__DIR__.'/../config/twig.php');
        }

        return isset($this->config['twig_global']) ? $this->config['twig_global'] : [];
    }