TwigSkinLoader
in package
implements
LoaderInterface
File loader for twig templates.
This obeys the same path rules as PHP views:
- using the unavailable skin
- using module/ sprout/ skin/ prefixes
TODO Some actual caching.
Table of Contents
Interfaces
- LoaderInterface
Properties
- $cache : array<string|int, string>
- File path cache.
- $templates : array<string|int, string>
- Template cache.
Methods
- exists() : mixed
- getCacheKey() : string
- getSourceContext() : Source
- isFresh() : bool
- findTemplate() : string
- Find a template for the current subsite skin.
Properties
$cache
File path cache.
protected
array<string|int, string>
$cache
= []
[ name => path ]
$templates
Template cache.
protected
array<string|int, string>
$templates
= []
[ name => template]
Methods
exists()
public
exists(string $name) : mixed
Parameters
- $name : string
Tags
getCacheKey()
public
getCacheKey(string $name) : string
Parameters
- $name : string
Tags
Return values
stringgetSourceContext()
public
getSourceContext(string $name) : Source
Parameters
- $name : string
Tags
Return values
SourceisFresh()
public
isFresh(string $name, int $time) : bool
Parameters
- $name : string
- $time : int
Tags
Return values
boolfindTemplate()
Find a template for the current subsite skin.
protected
findTemplate(string $name) : string
Parameters
- $name : string