\Smarty_Internal_Config

Smarty Internal Plugin Config

Main class for config variables

Summary

Methods
Properties
Constants
__construct()
getCompiledFilepath()
buildCompiledFilepath()
getCompiledTimestamp()
mustCompile()
getCompiledConfig()
compileConfigSource()
loadConfigVars()
__set()
__get()
$smarty
$data
$config_resource
$compiled_config
$compiled_filepath
$compiled_timestamp
$mustCompile
$compiler_object
$source
$compiled
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$smarty

$smarty : \Smarty

Samrty instance

Type

\Smarty — object

$data

$data : object

Object of config var storage

Type

object

$config_resource

$config_resource : string

Config resource

Type

string

$compiled_config

$compiled_config : string

Compiled config file

Type

string

$compiled_filepath

$compiled_filepath : string

filepath of compiled config file

Type

string

$compiled_timestamp

$compiled_timestamp : integer

Filemtime of compiled config Filemtime

Type

integer

$mustCompile

$mustCompile : boolean

flag if compiled config file is invalid and must be (re)compiled

Type

boolean

$source

$source : \Smarty_Config_Source

Type

\Smarty_Config_Source

$compiled

$compiled : \Smarty_Config_Compiled

Type

\Smarty_Config_Compiled

Methods

__construct()

__construct(string  $config_resource, \Smarty  $smarty, object  $data = null) 

Constructor of config file object

Parameters

string $config_resource

config file resource name

\Smarty $smarty

Smarty instance

object $data

object for config vars storage

getCompiledFilepath()

getCompiledFilepath() : string

Returns the compiled filepath

Returns

string —

the compiled filepath

buildCompiledFilepath()

buildCompiledFilepath() : string

Get file path.

Returns

string

getCompiledTimestamp()

getCompiledTimestamp() : integer

Returns the timpestamp of the compiled file

Returns

integer —

the file timestamp

mustCompile()

mustCompile() : boolean

Returns if the current config file must be compiled

It does compare the timestamps of config source and the compiled config and checks the force compile configuration

Returns

boolean —

true if the file must be compiled

getCompiledConfig()

getCompiledConfig() : string

Returns the compiled config file

It checks if the config file must be compiled or just read the compiled version

Returns

string —

the compiled config file

compileConfigSource()

compileConfigSource() 

Compiles the config files

Throws

\Exception

loadConfigVars()

loadConfigVars(mixed  $sections = null, object  $scope = 'local') 

load config variables

Parameters

mixed $sections

array of section names, single section or null

object $scope

global,parent or local

__set()

__set(string  $property_name, mixed  $value) 

set Smarty property in template context

Parameters

string $property_name

property name

mixed $value

value

Throws

\SmartyException

if $property_name is not valid

__get()

__get(string  $property_name) 

get Smarty property in template context

Parameters

string $property_name

property name

Throws

\SmartyException

if $property_name is not valid