\patTemplate_TemplateCache

Base class for patTemplate template cache

$Id: TemplateCache.php 219 2004-05-25 20:38:38Z schst $

A template cache is used to cache the data after the template has been read, but before the variables have been added.

Data is normally stored in serialized format. This will increase performance.

This is not related to an output cache!

Summary

Methods
Properties
Constants
getName()
setParams()
getParam()
load()
write()
getKey()
$_name
$_params
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_name

$_name : string

module name

This has to be set in the final module classes.

Type

string

$_params

$_params : array

module parameters

Type

array

Methods

getName()

getName() : string

get the name of the module

Returns

string —

name of the module

setParams()

setParams(  $params,   $clear = false) 

sets parameters of the module

Parameters

$params
$clear

getParam()

getParam(  $name) : mixed

gets a parameter of the module

Parameters

$name

Returns

mixed —

value of the parameter

load()

load(  $key,   $modTime = -1) : array|boolean

load template from cache

Parameters

$key
$modTime

Returns

array|boolean —

either an array containing the templates or false cache could not be loaded

write()

write(  $key,   $templates) 

write template to cache

Parameters

$key
$templates

getKey()

getKey(  $input,   $options = array()) : string

get the cache key for the input

Parameters

$input
$options

Returns

string —

key