mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Add missing properties
This commit is contained in:
@@ -17,6 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
abstract class Smarty_Internal_TemplateCompilerBase
|
abstract class Smarty_Internal_TemplateCompilerBase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Smarty object
|
||||||
|
* @var Smarty
|
||||||
|
*/
|
||||||
|
public $smarty = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hash for nocache sections
|
* hash for nocache sections
|
||||||
*
|
*
|
||||||
@@ -197,6 +203,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $templateFunctionCode = '';
|
public $templateFunctionCode = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flags for used modifier plugins
|
* flags for used modifier plugins
|
||||||
*
|
*
|
||||||
@@ -218,6 +225,50 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
*/
|
*/
|
||||||
public $parent_compiler = null;
|
public $parent_compiler = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag true when compiling nocache section
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $nocache = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag true when tag is compiled as nocache
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $tag_nocache = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag to restart parsing
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $abort_and_recompile = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compiled tag prefix code
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $prefix_code = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prefix code stack
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $prefixCodeStack = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tag has compiled code
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $has_code = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tag creates output
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $has_output = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strip preg pattern
|
* Strip preg pattern
|
||||||
*
|
*
|
||||||
@@ -247,6 +298,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
*
|
*
|
||||||
* @param Smarty_Internal_Template $template template object to compile
|
* @param Smarty_Internal_Template $template template object to compile
|
||||||
* @param bool $nocache true is shall be compiled in nocache mode
|
* @param bool $nocache true is shall be compiled in nocache mode
|
||||||
|
* @param null|Smarty_Internal_TemplateCompilerBase $parent_compiler
|
||||||
*
|
*
|
||||||
* @return bool true if compiling succeeded, false if it failed
|
* @return bool true if compiling succeeded, false if it failed
|
||||||
*/
|
*/
|
||||||
@@ -328,6 +380,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
$merged_code .= $code;
|
$merged_code .= $code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$_compiled_code = '';
|
||||||
// run postfilter if required on compiled template code
|
// run postfilter if required on compiled template code
|
||||||
if ((isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) && !$this->suppressFilter && $_compiled_code != '') {
|
if ((isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) && !$this->suppressFilter && $_compiled_code != '') {
|
||||||
$_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);
|
$_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);
|
||||||
@@ -611,7 +664,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
*
|
*
|
||||||
* @return null|\Smarty_Internal_ParseTree_Text
|
* @return null|\Smarty_Internal_ParseTree_Text
|
||||||
*/
|
*/
|
||||||
public function processText($text) {
|
public function processText($text)
|
||||||
|
{
|
||||||
if ($this->inheritance_child && !$this->blockTagNestingLevel) {
|
if ($this->inheritance_child && !$this->blockTagNestingLevel) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -620,7 +674,6 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
} else {
|
} else {
|
||||||
return new Smarty_Internal_ParseTree_Text($this->parser, $text);
|
return new Smarty_Internal_ParseTree_Text($this->parser, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -842,7 +895,6 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* restore file and line offset
|
* restore file and line offset
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public function popTrace()
|
public function popTrace()
|
||||||
{
|
{
|
||||||
@@ -883,6 +935,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
|||||||
// individual error message
|
// individual error message
|
||||||
$error_text .= $args;
|
$error_text .= $args;
|
||||||
} else {
|
} else {
|
||||||
|
$expect = array();
|
||||||
// expected token from parser
|
// expected token from parser
|
||||||
$error_text .= ' - Unexpected "' . $this->lex->value . '"';
|
$error_text .= ' - Unexpected "' . $this->lex->value . '"';
|
||||||
if (count($this->parser->yy_get_expected_tokens($this->parser->yymajor)) <= 4) {
|
if (count($this->parser->yy_get_expected_tokens($this->parser->yymajor)) <= 4) {
|
||||||
|
Reference in New Issue
Block a user