\Twig_ContainerRuntimeLoader

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

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

Summary

Methods
Properties
Constants
__construct()
load()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$container
N/A

Properties

$container

$container : 

Type

Methods

__construct()

__construct(\Psr\Container\ContainerInterface  $container) 

Parameters

\Psr\Container\ContainerInterface $container

load()

load(string  $class) : object|null

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

Parameters

string $class

A runtime class

Returns

object|null —

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