Commit daf0a014 by Seldaek

git-svn-id: svn://dwoo.org/dwoo/trunk@42 0598d79b-80c4-4d41-97ba-ac86fbbd088b

parent cc6c72f5
...@@ -47,10 +47,16 @@ class Dwoo_Plugin_smartyinterface extends Dwoo_Plugin ...@@ -47,10 +47,16 @@ class Dwoo_Plugin_smartyinterface extends Dwoo_Plugin
else else
$callback = 'smarty_block_'.$func.'('; $callback = 'smarty_block_'.$func.'(';
$paramsOut = '';
foreach($params as $i=>$p)
{
$paramsOut .= var_export($i, true).' => '.$p.',';
}
$curBlock =& $compiler->getCurrentBlock(); $curBlock =& $compiler->getCurrentBlock();
$curBlock['params']['postOut'] = Dwoo_Compiler::PHP_OPEN.' $_block_content = ob_get_clean(); $_block_repeat=false; echo '.$callback.'$_tag_stack[count($_tag_stack)-1], $_block_content, $this, $_block_repeat); } array_pop($_tag_stack);'.Dwoo_Compiler::PHP_CLOSE; $curBlock['params']['postOut'] = Dwoo_Compiler::PHP_OPEN.' $_block_content = ob_get_clean(); $_block_repeat=false; echo '.$callback.'$_tag_stack[count($_tag_stack)-1], $_block_content, $this, $_block_repeat); } array_pop($_tag_stack);'.Dwoo_Compiler::PHP_CLOSE;
return Dwoo_Compiler::PHP_OPEN.$prepend.' if(!isset($_tag_stack)){ $_tag_stack = array(); } $_tag_stack[] = '.var_export($params,true).'; $_block_repeat=true; '.$callback.'$_tag_stack[count($_tag_stack)-1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start();'.Dwoo_Compiler::PHP_CLOSE; return Dwoo_Compiler::PHP_OPEN.$prepend.' if(!isset($_tag_stack)){ $_tag_stack = array(); } $_tag_stack[] = array('.$paramsOut.'); $_block_repeat=true; '.$callback.'$_tag_stack[count($_tag_stack)-1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start();'.Dwoo_Compiler::PHP_CLOSE;
} }
public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend='', $append='') public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend='', $append='')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment