Documentation

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
inheritdoc

getCacheKey()

public getCacheKey(string $name) : string
Parameters
$name : string
Tags
inheritdoc
Return values
string

getSourceContext()

public getSourceContext(string $name) : Source
Parameters
$name : string
Tags
inheritdoc
Return values
Source

isFresh()

public isFresh(string $name, int $time) : bool
Parameters
$name : string
$time : int
Tags
inheritdoc
Return values
bool
On this page

Search results