PHP Class Twig_Loader_Kohana, kohana-twig

Author: Mathew Davies ([email protected])
Inheritance: implements Twig_LoaderInterface
Datei anzeigen Open project: jonathangeiger/kohana-twig

Protected Properties

Property Type Description
$cache array Array of filepaths

Public Methods

Method Description
getCacheKey ( string $name ) : string Gets the cache key to use for the cache for a given template name.
getSource ( string $name ) : string Gets the source code of a template, given its name.
isFresh ( string $name, timestamp $time ) Returns true if the template is still fresh.

Protected Methods

Method Description
findTemplate ( string $name ) : string Find the template using the find_file method.

Method Details

findTemplate() protected method

Find the template using the find_file method.
protected findTemplate ( string $name ) : string
$name string The name of the template
return string The full path to the template.

getCacheKey() public method

Gets the cache key to use for the cache for a given template name.
public getCacheKey ( string $name ) : string
$name string string The name of the template to load
return string The cache key

getSource() public method

Gets the source code of a template, given its name.
public getSource ( string $name ) : string
$name string The name of the template to load
return string The template source code

isFresh() public method

Returns true if the template is still fresh.
public isFresh ( string $name, timestamp $time )
$name string The template name
$time timestamp The last modification time of the cached template

Property Details

$cache protected_oe property

Array of filepaths
protected array $cache
return array