class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
Loads template from the filesystem.
Methods
|
__construct(string|array $paths)
Constructor. |
||
| array |
getPaths(string $namespace = '__main__')
Returns the paths to the templates. |
|
| array |
getNamespaces()
Returns the path namespaces. |
|
|
setPaths(string|array $paths, string $namespace = '__main__')
Sets the paths where templates are stored. |
||
|
addPath(string $path, string $namespace = '__main__')
Adds a path where templates are stored. |
||
|
prependPath(string $path, string $namespace = '__main__')
Prepends a path where templates are stored. |
||
| string |
getSource(string $name)
Gets the source code of a template, given its name. |
|
| string |
getCacheKey(string $name)
Gets the cache key to use for the cache for a given template name. |
|
| boolean |
exists(string $name)
Check if we have the source code of a template, given its name. |
|
| Boolean |
isFresh(string $name, timestamp $time)
Returns true if the template is still fresh. |
Details
at line 27
public
__construct(string|array $paths)
Constructor.
at line 39
public array
getPaths(string $namespace = '__main__')
Returns the paths to the templates.
at line 51
public array
getNamespaces()
Returns the path namespaces.
The "__main__" namespace is always defined.
at line 62
public
setPaths(string|array $paths, string $namespace = '__main__')
Sets the paths where templates are stored.
at line 82
public
addPath(string $path, string $namespace = '__main__')
Adds a path where templates are stored.
at line 102
public
prependPath(string $path, string $namespace = '__main__')
Prepends a path where templates are stored.
at line 123
public string
getSource(string $name)
Gets the source code of a template, given its name.
at line 131
public string
getCacheKey(string $name)
Gets the cache key to use for the cache for a given template name.
at line 139
public boolean
exists(string $name)
Check if we have the source code of a template, given its name.
at line 158
public Boolean
isFresh(string $name, timestamp $time)
Returns true if the template is still fresh.