\Smarty_Template_Cached

Smarty Resource Data Object Cache Data Container for Template Files

Summary

Methods
Properties
Constants
process()
getRenderedTemplateCode()
getTimeStamp()
__construct()
load()
render()
isCached()
read()
$filepath
$timestamp
$exists
$compile_id
$processed
$unifunc
$has_nocache_code
$file_dependency
$content
$required_plugins
$includes
$isCache
$valid
$handler
$cache_id
$cache_lifetime
$lock_id
$is_locked
$source
$hashes
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$filepath

$filepath : string

Compiled Filepath

Type

string

$timestamp

$timestamp : integer|boolean

Compiled Timestamp

Type

integer|boolean

$exists

$exists : boolean

Compiled Existence

Type

boolean

$compile_id

$compile_id : string

Template Compile Id (Smarty_Internal_Template::$compile_id)

Type

string

$processed

$processed : boolean

Compiled Content Loaded

Type

boolean

$unifunc

$unifunc : string

unique function name for compiled template code

Type

string

$has_nocache_code

$has_nocache_code : boolean

flag if template does contain nocache code sections

Type

boolean

$file_dependency

$file_dependency : array

resource file dependency

Type

array

$content

$content : string

Content buffer

Type

string

$required_plugins

$required_plugins : array

required plugins

Type

array

$includes

$includes : array

Included subtemplates

Type

array

$isCache

$isCache : boolean

Flag if this is a cache resource

Type

boolean

$valid

$valid : boolean

Cache Is Valid

Type

boolean

$cache_id

$cache_id : string

Template Cache Id (Smarty_Internal_Template::$cache_id)

Type

string

$cache_lifetime

$cache_lifetime : integer

saved cache lifetime in seconds

Type

integer

$lock_id

$lock_id : string

Id for cache locking

Type

string

$is_locked

$is_locked : boolean

flag that cache is locked by this instance

Type

boolean

$hashes

$hashes : array

Nocache hash codes of processed compiled templates

Type

array

Methods

process()

process(\Smarty_Internal_Template  $_template, boolean  $update = false) 

Process cached template

Parameters

\Smarty_Internal_Template $_template

template object

boolean $update

flag if called because cache update

getRenderedTemplateCode()

getRenderedTemplateCode(\Smarty_Internal_Template  $_template, string  $unifunc = null) 

get rendered template content by calling compiled or cached template code

Parameters

\Smarty_Internal_Template $_template
string $unifunc

function with template code

Throws

\Exception

getTimeStamp()

getTimeStamp() : integer

Get compiled time stamp

Returns

integer

__construct()

__construct(\Smarty_Internal_Template  $_template) 

create Cached Object container

Parameters

\Smarty_Internal_Template $_template

template object

render()

render(\Smarty_Internal_Template  $_template, boolean  $no_output_filter = true) 

Render cache template

Parameters

\Smarty_Internal_Template $_template
boolean $no_output_filter

Throws

\Exception

isCached()

isCached(\Smarty_Internal_Template  $_template) : boolean

Check if cache is valid, lock cache if required

Parameters

\Smarty_Internal_Template $_template

Returns

boolean —

flag true if cache is valid

read()

read(\Smarty_Internal_Template  $_template) : string|false

Read cache content from handler

Parameters

\Smarty_Internal_Template $_template

template object

Returns

string|false —

content