Utility class

package Smarty
subpackage Security

 Methods

Delete compiled template file

clearCompiledTemplate(string $resource_name, string $compile_id, integer $exp_time, \Smarty $smarty) : integer
Static

Parameters

$resource_name

string

template name

$compile_id

string

compile id

$exp_time

integer

expiration time

$smarty

\Smarty

Smarty instance

Returns

integernumber of template files deleted

Compile all config files

compileAllConfig($extention, bool $force_compile, int $time_limit, int $max_errors, \Smarty $smarty) : integer
Static

Parameters

$extention

$force_compile

bool

force all to recompile

$time_limit

int

set maximum execution time

$max_errors

int

set maximum allowed errors

$smarty

\Smarty

Smarty instance

Returns

integernumber of config files compiled

Compile all template files

compileAllTemplates($extention, bool $force_compile, int $time_limit, int $max_errors, \Smarty $smarty) : integer
Static

Parameters

$extention

$force_compile

bool

force all to recompile

$time_limit

int

set maximum execution time

$max_errors

int

set maximum allowed errors

$smarty

\Smarty

Smarty instance

Returns

integernumber of template files compiled

Return array of tag/attributes of all tags used by an template

getTags(\Smarty_Internal_Template $template) : array
Static

Parameters

$template

Returns

arrayof tag/attributes

diagnose Smarty setup

testInstall(\Smarty $smarty, array $errors) : bool
Static

If $errors is secified, the diagnostic report will be appended to the array, rather than being output.

Parameters

$smarty

\Smarty

Smarty instance to test

$errors

array

array to push results into rather than outputting them

Returns

boolstatus, true if everything is fine, false else

private constructor to prevent calls creation of new instances

__construct()