ArrayLoader
class ArrayLoader extends Loader
Loads a template from an array.
Properties
protected string | $extension | from Loader | |
protected array | $fallbackCache | from Loader | |
protected array | $cache | from Loader | |
protected Model | $source | from Loader | |
protected | $templates |
Methods
No description
Gets the markup section of a template, given its name.
Gets the source code of a template, given its name.
No description
Gets the cache key to use for the cache for a given template name.
Returns true if the template is still fresh.
No description
No description
No description
Adds or overrides a template.
Details
in
Loader at line 41
setSource(TemplateSource $source)
Sets a object to load the template from.
at line 11
TemplateSource
getSource()
No description
at line 48
string
getMarkup(string $name)
Gets the markup section of a template, given its name.
at line 62
string
getContents(string $name)
Gets the source code of a template, given its name.
at line 34
getFilename($name)
No description
in
Loader at line 82
protected string
findTemplate(string $name)
Gets the path of a view file
at line 72
string
getCacheKey(string $name)
Gets the cache key to use for the cache for a given template name.
at line 81
bool
isFresh(string $name, int $time)
Returns true if the template is still fresh.
at line 67
exists($name)
No description
at line 90
getFilePath()
No description
at line 18
__construct(array $templates = [])
No description
at line 29
setTemplate(string $name, string $template)
Adds or overrides a template.