function Environment::getGlobals
Return value
array<string, mixed>
2 calls to Environment::getGlobals()
- Environment::addGlobal in vendor/
twig/ twig/ src/ Environment.php - Registers a Global.
- Environment::mergeGlobals in vendor/
twig/ twig/ src/ Environment.php
File
-
vendor/
twig/ twig/ src/ Environment.php, line 834
Class
- Environment
- Stores the Twig configuration and renders templates.
Namespace
TwigCode
public function getGlobals() : array {
if ($this->extensionSet
->isInitialized()) {
if (null === $this->resolvedGlobals) {
$this->resolvedGlobals = array_merge($this->extensionSet
->getGlobals(), $this->globals);
}
return $this->resolvedGlobals;
}
return array_merge($this->extensionSet
->getGlobals(), $this->globals);
}