$this->extensions
[$class] =
$extension;
} public function addFunction(TwigFunction
$function): void
{ if ($this->initialized
) { throw new \
LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.',
$function->
getName()));
} $this->staging->
addFunction($function);
} /**
* @return TwigFunction[]
*/
public function getFunctions(): array
{ if (!
$this->initialized
) { $this->
initExtensions();
}