You are here

public function Twig_Environment::getGlobals in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::getGlobals()

Gets the registered Globals.

Return value

array An array of globals

1 call to Twig_Environment::getGlobals()
Twig_Environment::mergeGlobals in vendor/twig/twig/lib/Twig/Environment.php
Merges a context with the defined globals.

File

vendor/twig/twig/lib/Twig/Environment.php, line 1193

Class

Twig_Environment
Stores the Twig configuration.

Code

public function getGlobals() {
  if (!$this->runtimeInitialized && !$this->extensionInitialized) {
    return $this
      ->initGlobals();
  }
  if (null === $this->globals) {
    $this->globals = $this
      ->initGlobals();
  }
  return $this->globals;
}