src/View/TwigView.php
public function setGlobal($name, $value, $options = []) {
        if (isset($options['namespace'])) {
            $this->getEnvironment()->addGlobal($options['namespace'], [$name => $value]);
        } else {
            $this->getEnvironment()->addGlobal($name, $value);
        }   
    }
public function setGlobal($name, $value, $options = []) {
        if (isset($options['namespace'])) {
            $this->getEnvironment()->addGlobal($options['namespace'], [$name => $value]);
        } else {
            $this->getEnvironment()->addGlobal($name, $value);
        }   
    }
Adds global variable to view
@param string $name
@param string $value
@param array  $options