1 | <?php |
||
11 | class ControlNode extends ANode |
||
12 | { |
||
13 | /** |
||
14 | * The name of the Htsl.php control structure. |
||
15 | * |
||
16 | * @access private |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | private $name; |
||
21 | |||
22 | /** |
||
23 | * The name of the complied(PHP) control structure. |
||
24 | * |
||
25 | * @access private |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | private $structureName; |
||
30 | |||
31 | /** |
||
32 | * Parameters. |
||
33 | * |
||
34 | * @access private |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | private $param; |
||
39 | |||
40 | /** |
||
41 | * Unique id for check whether loop executed. |
||
42 | * |
||
43 | * @access private |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | private $id; |
||
48 | |||
49 | /** |
||
50 | * Real constructor. |
||
51 | * |
||
52 | * @access protected |
||
53 | * |
||
54 | * @return \Htsl\Parser\Node\Contracts\ANode |
||
|
|||
55 | */ |
||
56 | protected function construct():parent |
||
71 | |||
72 | /** |
||
73 | * Opening this control node, and returning node opener. |
||
74 | * |
||
75 | * @access public |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function open():string |
||
83 | |||
84 | /** |
||
85 | * Getting whether this node contains a scope and scope name. |
||
86 | * |
||
87 | * @access public |
||
88 | * |
||
89 | * @return string | null |
||
90 | */ |
||
91 | public function getScope() |
||
95 | |||
96 | |||
97 | /** |
||
98 | * Close this control node, and returning node closer. |
||
99 | * |
||
100 | * @access public |
||
101 | * |
||
102 | * @param \Htsl\ReadingBuffer\Line $closerLine The line when node closed. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | public function close( Line$closerLine ):string |
||
121 | |||
122 | /** |
||
123 | * Parse opener or closer with parameters. |
||
124 | * |
||
125 | * @access private |
||
126 | * |
||
127 | * @param string $input Opener or Closer |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | private function withParam( string$input ) |
||
156 | } |
||
157 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.