$_tag_stack
$_tag_stack : array
tag stack
$template : \Box\Brainy\Templates\Template
current template
$lex : \Box\Brainy\Compiler\Lexer
Lexer object
$parser : \Box\Brainy\Compiler\Parser
Parser object
$smarty : \Box\Brainy\Brainy
Smarty object
__construct(\Box\Brainy\Brainy $smarty)
\Box\Brainy\Brainy | $smarty | global instance |
compileTemplate(\Box\Brainy\Templates\Template $template) : boolean
Method to compile a Smarty template
\Box\Brainy\Templates\Template | $template | template object to compile |
true if compiling succeeded, false if it failed
trigger_template_error(string $args = null, string $line = null, string|void $exception_class = '\Box\Brainy\Exceptions\SmartyCompilerException')
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
string | $args | individual error message or null |
string | $line | line-number |
string|void | $exception_class | The name of the exception class to raise |
when an unexpected token is found
assert_is_not_strict(string $reason, \Box\Brainy\Templates\Template|null|void $template = null) : void
string | $reason | |
\Box\Brainy\Templates\Template|null|void | $template |