\Twig\LoaderSourceContextLoaderInterface

Empty interface for Twig 1.x compatibility.

Summary

Methods
Constants
getSourceContext()
getCacheKey()
isFresh()
exists()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getSourceContext()

getSourceContext(string  $name) : \Twig_Source

Returns the source context for a given template logical name.

Parameters

string $name

The template logical name

Throws

\Twig_Error_Loader

When $name is not found

Returns

\Twig_Source

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

Throws

\Twig_Error_Loader

When $name is not found

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

Throws

\Twig_Error_Loader

When $name is not found

Returns

boolean —

true if the template is fresh, false otherwise

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