Twig_ContainerRuntimeLoader

Extends\Twig\RuntimeLoader\ContainerRuntimeLoader

Lazily loads Twig runtime implementations from a PSR-11 container.

Note that the runtime services MUST use their class names as identifiers.

package

Default

Methods

__construct

__construct(\Psr\Container\ContainerInterface $container)
inherited

Arguments

$container

\Psr\Container\ContainerInterface

Creates the runtime implementation of a Twig element (filter/function/test).

load(string $class): object|null
inherited

Arguments

$class

string

A runtime class

Response

object|null

The runtime instance or null if the loader does not know how to create the runtime for this class

Properties

container

container :
inherited

Type(s)