Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2809 rexy 1
<?php
2
 
3
/**
4
 * Smarty {block} tag class
5
 *
6
 * @package    Smarty
7
 * @subpackage PluginsInternal
8
 * @author     Uwe Tews
9
 */
10
class Smarty_Internal_Block
11
{
12
    /**
13
     * Block name
14
     *
15
     * @var string
16
     */
17
    public $name = '';
18
 
19
    /**
20
     * Hide attribute
21
     *
22
     * @var bool
23
     */
24
    public $hide = false;
25
 
26
    /**
27
     * Append attribute
28
     *
29
     * @var bool
30
     */
31
    public $append = false;
32
 
33
    /**
34
     * prepend attribute
35
     *
36
     * @var bool
37
     */
38
    public $prepend = false;
39
 
40
    /**
41
     * Block calls $smarty.block.child
42
     *
43
     * @var bool
44
     */
45
    public $callsChild = false;
46
 
47
    /**
48
     * Inheritance child block
49
     *
50
     * @var Smarty_Internal_Block|null
51
     */
52
    public $child = null;
53
 
54
    /**
55
     * Inheritance calling parent block
56
     *
57
     * @var Smarty_Internal_Block|null
58
     */
59
    public $parent = null;
60
 
61
    /**
62
     * Inheritance Template index
63
     *
64
     * @var int
65
     */
66
    public $tplIndex = 0;
67
 
68
    /**
69
     * Smarty_Internal_Block constructor.
70
     * - if outer level {block} of child template ($state === 1) save it as child root block
71
     * - otherwise process inheritance and render
72
     *
73
     * @param string   $name     block name
74
     * @param int|null $tplIndex index of outer level {block} if nested
75
     */
76
    public function __construct($name, $tplIndex)
77
    {
78
        $this->name = $name;
79
        $this->tplIndex = $tplIndex;
80
    }
81
 
82
    /**
83
     * Compiled block code overloaded by {block} class
84
     *
85
     * @param \Smarty_Internal_Template $tpl
86
     */
87
    public function callBlock(Smarty_Internal_Template $tpl)
88
    {
89
    }
90
}