Completed
Branch master (e379bd)
by Pierre-Henry
33:06
created

Smarty_Internal_Block::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
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)
0 ignored issues
show
Unused Code introduced by
The parameter $tpl is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
88
    {
89
    }
90
}