public function addGlobal($name, $value)
    {
        if (null === $this->globals) {
            $this->initGlobals();
        }

        $this->globals[$name] = $value;

        return $this;
    }
public function addGlobal($name, $value)
    {
        if (null === $this->globals) {
            $this->initGlobals();
        }

        $this->globals[$name] = $value;

        return $this;
    }
public function addGlobal ( $ name , $ value ) { if ( null === $ this -> globals ) { $ this -> initGlobals ( ) ; } $ this -> globals [ $ name ] = $ value ; return $ this ; }
Registers a Global.
New globals can be added before compiling or rendering a template
but after, you can only update existing globals.

@param string $name
@param mixed  $value

@return $this
@throws Exception
Registers a Global . New globals can be added before compiling or rendering a template but after you can only update existing globals .