FactoryRuntimeLoader
in package
implements
RuntimeLoaderInterface
Lazy loads the runtime implementations for a Twig element.
Tags
Table of Contents
Interfaces
- RuntimeLoaderInterface
- Creates runtime implementations for Twig elements (filters/functions/tests).
Properties
- $map : mixed
Methods
- __construct() : mixed
- load() : object|null
- Creates the runtime implementation of a Twig element (filter/function/test).
Properties
$map
private
mixed
$map
Methods
__construct()
public
__construct([array<string|int, mixed> $map = [] ]) : mixed
Parameters
- $map : array<string|int, mixed> = []
-
An array where keys are class names and values factory callables
load()
Creates the runtime implementation of a Twig element (filter/function/test).
public
load(string $class) : object|null
Parameters
- $class : string
Return values
object|null —The runtime instance or null if the loader does not know how to create the runtime for this class