Хранилища Subversion ant

Редакция

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

Редакция Автор № строки Строка
304 alex-w 1
<?php
2
/**
3
* Smarty Internal Plugin Compile Foreach Else
4
*
5
* Compiles the {foreachelse} tag
6
* @package Smarty
7
* @subpackage Compiler
8
* @author Uwe Tews
9
*/
10
/**
11
* Smarty Internal Plugin Compile Foreachelse Class
12
*/
13
class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase {
14
    /**
15
    * Compiles code for the {foreachelse} 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
        $this->_close_tag('foreach');
28
        $this->_open_tag('foreachelse');
29
        return "<?php }} else { ?>";
30
    }
31
}
32
 
33
?>