Хранилища Subversion ant

Редакция

Содержимое файла | Последнее изменение | Открыть журнал | RSS

Редакция Автор № строки Строка
304 alex-w 1
<?php
2
/**
3
* Smarty Internal Plugin Compile Foreach Close
4
*
5
* Compiles the {/foreach} tag
6
* @package Smarty
7
* @subpackage Compiler
8
* @author Uwe Tews
9
*/
10
/**
11
* Smarty Internal Plugin Compile ForeachClose Class
12
*/
13
class Smarty_Internal_Compile_ForeachClose extends Smarty_Internal_CompileBase {
14
    /**
15
    * Compiles code for the {/foreach} tag
16
    *
17
    * @param array $args array with attributes from parser
18
    * @param object $compiler compiler object
19
    * @return string compiled code
20
    */
21
    public function compile($args, $compiler)
22
    {
23
        $this->compiler = $compiler;
24
        // check and get attributes
25
        $_attr = $this->_get_attributes($args);
26
 
27
        $_open_tag = $this->_close_tag(array('foreach', 'foreachelse'));
28
        if ($_open_tag == 'foreachelse')
29
            return "<?php } ?>";
30
        else
31
            return "<?php }} ?>";
32
    }
33
}
34
 
35
?>