\Twig_Loader_Array
Loads a template from an array.
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_Array
implements
Twig_LoaderInterface,Twig_ExistsLoaderInterface
{
- // members
- protected $templates;
- // methods
- public void __construct()
- public void setTemplate()
- public void getSource()
- public void exists()
- public void getCacheKey()
- public void isFresh()
Hierarchy
Implements
Members
protected
- $templates
Methods
public
- __construct() — Constructor.
- exists() — {@inheritdoc}
- getCacheKey() — {@inheritdoc}
- getSource() — {@inheritdoc}
- isFresh() — {@inheritdoc}
- setTemplate() — Adds or overrides a template.