35 $this->templates = array();
36 foreach ($templates as $name => $template) {
37 $this->templates[$name] = $template;
49 $this->templates[(string) $name] = $template;
57 $name = (string) $name;
58 if (!isset($this->templates[$name])) {
62 return $this->templates[$name];
70 return isset($this->templates[(
string) $name]);
78 $name = (string) $name;
79 if (!isset($this->templates[$name])) {
83 return $this->templates[$name];
91 $name = (string) $name;
92 if (!isset($this->templates[$name])) {
Loads a template from an array.
getCacheKey($name)
{Gets the cache key to use for the cache for a given template name.The name of the template to loadst...
setTemplate($name, $template)
Adds or overrides a template.
Adds an exists() method for loaders.
__construct(array $templates)
Constructor.
exists($name)
{Check if we have the source code of a template, given its name.The name of the template to check if ...
Interface all loaders must implement.
getSource($name)
{Gets the source code of a template, given its name.The name of the template to loadstring The templa...
Exception thrown when an error occurs during template loading.
isFresh($name, $time)
{Returns true if the template is still fresh.The template name The last modification time of the cach...