StringTemplateLoader
class StringTemplateLoader implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
Methods
Returns the source code for a given template name.
Returns the source context for a given template logical name.
Returns the cache key to use for the cache for a given template name.
Returns true if the template is still fresh. For this loader, the template is always fresh.
Check if we have the source code of a template, given its name.
Details
at line 22
string
getSource(string $name)
Returns the source code for a given template name.
For this loader, the name of the template is the source code.
at line 33
Twig_Source
getSourceContext(string $name)
Returns the source context for a given template logical name.
at line 46
string
getCacheKey(string $name)
Returns the cache key to use for the cache for a given template name.
For this loader, the name (source code) of the template is the cache key.
at line 59
bool
isFresh(string $name, int $time)
Returns true if the template is still fresh. For this loader, the template is always fresh.
at line 71
bool
exists(string $name)
Check if we have the source code of a template, given its name.