\Twig\LoaderChainLoader

Loads templates from other loaders.

Summary

Methods
Properties
Constants
__construct()
addLoader()
getSourceContext()
exists()
getCacheKey()
isFresh()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$hasSourceCache
$loaders
N/A

Properties

$hasSourceCache

$hasSourceCache : 

Type

$loaders

$loaders : 

Type

Methods

__construct()

__construct(array<mixed,\Twig_LoaderInterface>  $loaders = array()) 

Parameters

array<mixed,\Twig_LoaderInterface> $loaders

getSourceContext()

getSourceContext(string  $name) : \Twig_Source

Returns the source context for a given template logical name.

Parameters

string $name

The template logical name

Returns

\Twig_Source

exists()

exists(string  $name) : boolean

Check if we have the source code of a template, given its name.

Parameters

string $name

The name of the template to check if we can load

Returns

boolean —

If the template source code is handled by this loader or not

getCacheKey()

getCacheKey(string  $name) : string

Gets the cache key to use for the cache for a given template name.

Parameters

string $name

The name of the template to load

Returns

string —

The cache key

isFresh()

isFresh(string  $name, integer  $time) : boolean

Returns true if the template is still fresh.

Parameters

string $name

The template name

integer $time

Timestamp of the last modification time of the cached template

Returns

boolean —

true if the template is fresh, false otherwise