/** * Compiles code for the {/foreach} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object * @param array $parameter array with compilation parameter * * @return string compiled code */ public function compile($args, $compiler, $parameter) { // check and get attributes $_attr = $this->getAttributes($compiler, $args); // must endblock be nocache? if ($compiler->nocache) { $compiler->tag_nocache = true; } list($openTag, $compiler->nocache, $item, $key) = $this->closeTag($compiler, array('foreach', 'foreachelse')); return "<?php } ?>" . PP::smartyCompile('foreach', 'close', $item, $compiler->smarty); }