31 public function load($class)
33 if ($this->container->has($class)) {
34 return $this->container->get($class);
39 class_alias(
'Twig_ContainerRuntimeLoader',
'Twig\RuntimeLoader\ContainerRuntimeLoader',
false);
Lazily loads Twig runtime implementations from a PSR-11 container.
Creates runtime implementations for Twig elements (filters/functions/tests).
Describes the interface of a container that exposes methods to read its entries.
__construct(ContainerInterface $container)
load($class)
Creates the runtime implementation of a Twig element (filter/function/test).