1 | <?php |
||
13 | class Item |
||
14 | { |
||
15 | /** |
||
16 | * The parent CHM instance. |
||
17 | * |
||
18 | * @var CHM |
||
19 | */ |
||
20 | protected $chm; |
||
21 | |||
22 | /** |
||
23 | * The name of the tree item. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $name; |
||
28 | |||
29 | /** |
||
30 | * Is this item marked as new? |
||
31 | * |
||
32 | * @var bool |
||
33 | */ |
||
34 | protected $isNew; |
||
35 | |||
36 | /** |
||
37 | * The comment of the tree item. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $comment; |
||
42 | |||
43 | /** |
||
44 | * The keyword of the tree item. |
||
45 | * |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $keyword; |
||
49 | |||
50 | /** |
||
51 | * The value of the "See Also" parameter. |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $seeAlso; |
||
56 | |||
57 | /** |
||
58 | * The local path to the tree item. |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | protected $local; |
||
63 | |||
64 | /** |
||
65 | * The URL to the tree item. |
||
66 | * |
||
67 | * @var string |
||
68 | */ |
||
69 | protected $url; |
||
70 | |||
71 | /** |
||
72 | * The frame name for this item. |
||
73 | * |
||
74 | * @var string; |
||
75 | */ |
||
76 | protected $frameName; |
||
77 | |||
78 | /** |
||
79 | * The window name for this item. |
||
80 | * |
||
81 | * @var string; |
||
82 | */ |
||
83 | protected $windowName; |
||
84 | |||
85 | /** |
||
86 | * The path to an entry in another CHM file. |
||
87 | * |
||
88 | * @var string|array|null If it's an array, it has two keys: 'chm' and 'entry'. |
||
89 | */ |
||
90 | protected $merge; |
||
91 | |||
92 | /** |
||
93 | * The image number attribute. |
||
94 | * |
||
95 | * @var int|null |
||
96 | */ |
||
97 | protected $imageNumber; |
||
98 | |||
99 | /** |
||
100 | * The sub-elements of this Item. |
||
101 | * |
||
102 | * @var Tree |
||
103 | */ |
||
104 | protected $children; |
||
105 | |||
106 | /** |
||
107 | * Initializes the instance. |
||
108 | * |
||
109 | * @param CHM $chm The parent CHM instance. |
||
110 | * @param DOMElement $object The OBJECT element. |
||
111 | * |
||
112 | * @throws Exception Throw an Exception in case of errors. |
||
113 | * |
||
114 | * @return static |
||
|
|||
115 | */ |
||
116 | 1 | public function __construct(CHM $chm, DOMElement $object) |
|
186 | |||
187 | /** |
||
188 | * Get the name of the tree item. |
||
189 | * |
||
190 | * @return string |
||
191 | */ |
||
192 | 1 | public function getName() |
|
196 | |||
197 | /** |
||
198 | * Is this item marked as new? |
||
199 | * |
||
200 | * @return bool |
||
201 | */ |
||
202 | public function isNew() |
||
206 | |||
207 | /** |
||
208 | * Get the comment of the tree item. |
||
209 | * |
||
210 | * @return string |
||
211 | */ |
||
212 | public function getComment() |
||
216 | |||
217 | /** |
||
218 | * Get the keyword of the tree item. |
||
219 | * |
||
220 | * @return string |
||
221 | */ |
||
222 | public function getKeyword() |
||
226 | |||
227 | /** |
||
228 | * Get the value of the "See Also" parameter. |
||
229 | * |
||
230 | * @return string |
||
231 | */ |
||
232 | public function getSeeAlso() |
||
236 | |||
237 | /** |
||
238 | * Get the local path to the tree item. |
||
239 | * |
||
240 | * @return string |
||
241 | */ |
||
242 | public function getLocal() |
||
246 | |||
247 | /** |
||
248 | * Get the URL to the tree item. |
||
249 | * |
||
250 | * @return string |
||
251 | */ |
||
252 | 1 | public function getURL() |
|
256 | |||
257 | /** |
||
258 | * Get the frame name for this item. |
||
259 | * |
||
260 | * @return string |
||
261 | */ |
||
262 | public function getFrameName() |
||
266 | |||
267 | /** |
||
268 | * Get the window name for this item. |
||
269 | * |
||
270 | * @return string |
||
271 | */ |
||
272 | public function getWindowName() |
||
276 | |||
277 | /** |
||
278 | * Get the path to an entry in another CHM file. |
||
279 | * |
||
280 | * @var array|null If not null, it's an array with two keys: 'chm' and 'entry'. |
||
281 | */ |
||
282 | 1 | public function getMerge() |
|
286 | |||
287 | /** |
||
288 | * Get the image number attribute. |
||
289 | * |
||
290 | * @return int|null |
||
291 | */ |
||
292 | public function getImageNumber() |
||
296 | |||
297 | /** |
||
298 | * Get the sub-elements of this Item. |
||
299 | * |
||
300 | * @return Tree |
||
301 | */ |
||
302 | 1 | public function getChildren() |
|
306 | |||
307 | /** |
||
308 | * Resolve the items contained in other CHM files. |
||
309 | * |
||
310 | * @param Map $map |
||
311 | * |
||
312 | * @throws Exception Throw an Exception in case of errors. |
||
313 | * |
||
314 | * @return static[] |
||
315 | */ |
||
316 | 1 | public function resolve(Map $map) |
|
339 | } |
||
340 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.