Interface Twig_LoaderInterface

Implemented byTwig_Loader_Array, Twig_Loader_Chain, Twig_Loader_Filesystem, Twig_Loader_String

Interface all loaders must implement.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getCacheKey() Gets the cache key to use for the cache for a given template name. Twig_LoaderInterface
getSource() Gets the source code of a template, given its name. Twig_LoaderInterface
isFresh() Returns true if the template is still fresh. Twig_LoaderInterface

Method Details

getCacheKey() public abstract method

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

public abstract string getCacheKey ( $name )
$name string

The name of the template to load

return string

The cache key

throws Twig_Error_Loader

When $name is not found

getSource() public abstract method

Gets the source code of a template, given its name.

public abstract string getSource ( $name )
$name string

The name of the template to load

return string

The template source code

throws Twig_Error_Loader

When $name is not found

isFresh() public abstract method

Returns true if the template is still fresh.

public abstract bool isFresh ( $name, $time )
$name string

The template name

$time int

Timestamp of the last modification time of the

                cached template
return bool

True if the template is fresh, false otherwise

throws Twig_Error_Loader

When $name is not found