Lines Matching refs:compiler

62     public $compiler = null;  variable in Smarty_Internal_Compile_Block
73 public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter) argument
75 if (!isset($compiler->_cache['blockNesting'])) {
76 $compiler->_cache['blockNesting'] = 0;
78 if ($compiler->_cache['blockNesting'] == 0) {
80 $this->registerInit($compiler);
86 $_attr = $this->getAttributes($compiler, $args);
87 $compiler->_cache['blockNesting'] ++;
88 $compiler->_cache['blockName'][$compiler->_cache['blockNesting']] = $_attr['name'];
89 …$compiler->_cache['blockParams'][$compiler->_cache['blockNesting']][0] = 'block_' . preg_replace('…
90 $compiler->_cache['blockParams'][$compiler->_cache['blockNesting']][1] = false;
91 …$this->openTag($compiler, 'block', array($_attr, $compiler->nocache, $compiler->parser->current_bu…
92 $compiler->template->compiled->has_nocache_code,
93 $compiler->template->caching));
95 if ($compiler->tag_nocache) {
98 $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
103 $compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template();
104 $compiler->template->compiled->has_nocache_code = false;
105 $compiler->suppressNocacheProcessing = true;
116 static function compileChildBlock(Smarty_Internal_TemplateCompilerBase $compiler, $_name = null) argument
118 if (!isset($compiler->_cache['blockNesting'])) {
119 … $compiler->trigger_template_error(' tag {$smarty.block.child} used outside {block} tags ',
120 $compiler->parser->lex->taglineno);
122 $compiler->has_code = true;
123 $compiler->suppressNocacheProcessing = true;
124 $compiler->_cache['blockParams'][$compiler->_cache['blockNesting']][1] = true;
125 …tpl->ext->_inheritance->processBlock(\$_smarty_tpl, 2, {$compiler->_cache['blockName'][$compiler->…
137 … static function compileParentBlock(Smarty_Internal_TemplateCompilerBase $compiler, $_name = null) argument
139 if (!isset($compiler->_cache['blockNesting'])) {
140 … $compiler->trigger_template_error(' tag {$smarty.block.parent} used outside {block} tags ',
141 $compiler->parser->lex->taglineno);
143 $compiler->suppressNocacheProcessing = true;
144 $compiler->has_code = true;
145 …tpl->ext->_inheritance->processBlock(\$_smarty_tpl, 4, {$compiler->_cache['blockName'][$compiler->…
165 public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter) argument
167 …, $_nocache, $_buffer, $_has_nocache_code, $_caching) = $this->closeTag($compiler, array('block'));
169 $_block = $compiler->_cache['blockParams'][$compiler->_cache['blockNesting']];
170 unset($compiler->_cache['blockParams'][$compiler->_cache['blockNesting']]);
182 $_functionCode = $compiler->parser->current_buffer;
184 $compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template();
186 if ($compiler->template->compiled->has_nocache_code) {
190 …$output .= "/* {block '{$_name}'} {$compiler->template->source->type}:{$compiler->template->source…
192 $output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n";
193 …$output .= "\$_smarty_tpl->cached->hashes['{$compiler->template->compiled->nocache_hash}'] = true;…
198 $compiler->parser->current_buffer->append_subtree($compiler->parser,
199 … new Smarty_Internal_ParseTree_Tag($compiler->parser,
201 $compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
206 $output .= "/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n";
210 $compiler->parser->current_buffer->append_subtree($compiler->parser,
211 … new Smarty_Internal_ParseTree_Tag($compiler->parser,
213 …$compiler->blockOrFunctionCode .= $f = $compiler->parser->current_buffer->to_smarty_php($compiler-…
214 $compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template();
215 $this->compiler = $compiler;
216 $_functionCode = new Smarty_Internal_ParseTree_Tag($compiler->parser,
217 … )?echo '\/\*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/([\S\s]*?)\/\*\/%%…
219 … $_functionCode->to_smarty_php($compiler->parser)));
220 $this->compiler = null;
223 …$output .= "/* {block '{$_name}'} {$compiler->template->source->type}:{$compiler->template->sourc…
229 $compiler->parser->current_buffer->append_subtree($compiler->parser,
230 … new Smarty_Internal_ParseTree_Tag($compiler->parser,
232 $compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
240 $compiler->parser->current_buffer->append_subtree($compiler->parser,
241 … new Smarty_Internal_ParseTree_Tag($compiler->parser,
243 …$compiler->blockOrFunctionCode .= $compiler->parser->current_buffer->to_smarty_php($compiler->pars…
245 if (!empty($compiler->template->compiled->required_plugins['nocache'])) {
246 … foreach ($compiler->template->compiled->required_plugins['nocache'] as $plugin => $tmp) {
248 … $compiler->parent_compiler->template->compiled->required_plugins['compiled'][$plugin][$type] =
256 $compiler->template->compiled->has_nocache_code = $_has_nocache_code;
257 $compiler->tag_nocache = $compiler->nocache;
258 $compiler->nocache = $_nocache;
259 $compiler->parser->current_buffer = $_buffer;
261 if ($compiler->_cache['blockNesting'] == 1) {
262 …tpl->ext->_inheritance->processBlock(\$_smarty_tpl, 0, {$compiler->_cache['blockName'][$compiler->…
265 …tpl->ext->_inheritance->processBlock(\$_smarty_tpl, 0, {$compiler->_cache['blockName'][$compiler->…
270 $compiler->_cache['blockNesting'] --;
271 if ($compiler->_cache['blockNesting'] == 0) {
272 unset($compiler->_cache['blockNesting']);
274 $compiler->has_code = true;
275 $compiler->suppressNocacheProcessing = true;
287 …o '\/\*%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/)|(\/\*\/%%SmartyN…