\Smarty_Internal_Config_File_Compiler

Main config file compiler class

Summary

Methods
Properties
Constants
__construct()
compileTemplate()
trigger_config_file_error()
$lexer_class
$parser_class
$lex
$parser
$smarty
$template
$config_data
$write_compiled_code
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$lexer_class

$lexer_class : string

Lexer class name

Type

string

$parser_class

$parser_class : string

Parser class name

Type

string

$lex

$lex : object

Lexer object

Type

object

$parser

$parser : object

Parser object

Type

object

$smarty

$smarty : \Smarty

Smarty object

Type

\Smarty — object

$config_data

$config_data : array

Compiled config data sections and variables

Type

array

$write_compiled_code

$write_compiled_code : boolean

compiled config data must always be written

Type

boolean

Methods

__construct()

__construct(string  $lexer_class, string  $parser_class, \Smarty  $smarty) 

Initialize compiler

Parameters

string $lexer_class

class name

string $parser_class

class name

\Smarty $smarty

global instance

compileTemplate()

compileTemplate(\Smarty_Internal_Template  $template) : boolean

Method to compile Smarty config source.

Parameters

\Smarty_Internal_Template $template

Returns

boolean —

true if compiling succeeded, false if it failed

trigger_config_file_error()

trigger_config_file_error(string  $args = null) 

display compiler error messages without dying If parameter $args is empty it is a parser detected syntax error.

In this case the parser is called to obtain information about expected tokens. If parameter $args contains a string this is used as error message

Parameters

string $args

individual error message or null

Throws

\SmartyCompilerException