Class Twig_Loader_String

InheritanceTwig_Loader_String
ImplementsTwig_ExistsLoaderInterface, Twig_LoaderInterface
Deprecated since version since 1.18.1 (to be removed in 2.0)

Loads a template from a string.

This loader should NEVER be used. It only exists for Twig internal purposes.

When using this loader with a cache mechanism, you should know that a new cache key is generated each time a template content "changes" (the cache key being the source code of the template). If you don't want to see your cache grows out of control, you need to take care of clearing the old cache file by yourself.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
exists() {@inheritdoc} Twig_Loader_String
getCacheKey() {@inheritdoc} Twig_Loader_String
getSource() {@inheritdoc} Twig_Loader_String
isFresh() {@inheritdoc} Twig_Loader_String

Method Details

exists() public method

{@inheritdoc}

public void exists ( $name )
$name
getCacheKey() public method

{@inheritdoc}

public void getCacheKey ( $name )
$name
getSource() public method

{@inheritdoc}

public void getSource ( $name )
$name
isFresh() public method

{@inheritdoc}

public void isFresh ( $name, $time )
$name
$time