mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-19 22:07:40 +00:00
Add the possibility to reset globals
This commit is contained in:
@@ -830,6 +830,12 @@ class Environment
|
||||
return array_merge($this->extensionSet->getGlobals(), $this->globals);
|
||||
}
|
||||
|
||||
public function resetGlobals(): void
|
||||
{
|
||||
$this->resolvedGlobals = null;
|
||||
$this->extensionSet->resetGlobals();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Twig 3.13
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user