FactoryRuntimeLoader

Implements\Twig\RuntimeLoader\RuntimeLoaderInterface

Lazy loads the runtime implementations for a Twig element.

author

Robin Chalas robin.chalas@gmail.com

package

Default

Methods

__construct

__construct(array $map = array())

Arguments

$map

array

An array where keys are class names and values factory callables

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

load(string $class): object|null

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

map

map :

Type(s)