\Disco\classesTemplateLoader

Extension of \Twig_Loader_Filesystem which allows for extension-less template execution.

Summary

Methods
Properties
Constants
getFinalName()
getSource()
getCacheKey()
isFresh()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getFinalName()

getFinalName(string  $name) : string

Get the final name where a template lives, regardless of whether it was called with an extension or not.

Parameters

string $name

The template name.

Throws

\Twig_Error_Loader

Returns

string —

The final template name.

getSource()

getSource(string  $name) : string

Get the contents of a template.

Parameters

string $name

The template name.

Returns

string —

The contents of the template.

getCacheKey()

getCacheKey(string  $name) : string

Get the cache name of a template.

Parameters

string $name

The template name.

Returns

string —

The final name of the template.

isFresh()

isFresh(string  $name, integer  $time) : boolean

Determine whether a template has been updated since the last cache.

Parameters

string $name

The template name.

integer $time

The cached last mod time of the template.

Returns

boolean —

Whether the template is fresh.