\Twig_Loader_String
Loads a template from a string.
This loader should only be used for unit testing as it has many limitations
(for instance, the include or extends tag does not make any sense for a string
loader).
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.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Twig_Loader_String
implements
Twig_LoaderInterface,Twig_ExistsLoaderInterface
{
- // methods
- public void getSource()
- public void exists()
- public void getCacheKey()
- public void isFresh()
Hierarchy
Implements
Methods
public
- exists() — {@inheritdoc}
- getCacheKey() — {@inheritdoc}
- getSource() — {@inheritdoc}
- isFresh() — {@inheritdoc}