4
4
5
5
class DOMDocumentType extends DOMNode
6
6
{
7
+ /** @readonly */
8
+ public string $ name ;
9
+
10
+ /** @readonly */
11
+ public DOMNamedNodeMap $ entities ;
12
+
13
+ /** @readonly */
14
+ public DOMNamedNodeMap $ notations ;
15
+
16
+ /** @readonly */
17
+ public string $ publicId ;
18
+
19
+ /** @readonly */
20
+ public string $ systemId ;
21
+
22
+ /** @readonly */
23
+ public ?string $ internalSubset ;
7
24
}
8
25
9
26
class DOMCdataSection extends DOMText
@@ -41,6 +58,54 @@ public function replaceWith(...$nodes): void;
41
58
42
59
class DOMNode
43
60
{
61
+ /** @readonly */
62
+ public string $ nodeName ;
63
+
64
+ /** @var string|null */
65
+ public $ nodeValue ;
66
+
67
+ /** @readonly */
68
+ public int $ nodeType ;
69
+
70
+ /** @readonly */
71
+ public ?DOMNode $ parentNode ;
72
+
73
+ /** @readonly */
74
+ public DOMNodeList $ childNodes ;
75
+
76
+ /** @readonly */
77
+ public ?DOMNode $ firstChild ;
78
+
79
+ /** @readonly */
80
+ public ?DOMNode $ lastChild ;
81
+
82
+ /** @readonly */
83
+ public ?DOMNode $ previousSibling ;
84
+
85
+ /** @readonly */
86
+ public ?DOMNode $ nextSibling ;
87
+
88
+ /** @readonly */
89
+ public ?DOMNamedNodeMap $ attributes ;
90
+
91
+ /** @readonly */
92
+ public ?DOMDocument $ ownerDocument ;
93
+
94
+ /** @readonly */
95
+ public ?string $ namespaceURI ;
96
+
97
+ /** @var string */
98
+ public $ prefix = "" ;
99
+
100
+ /** @readonly */
101
+ public ?string $ localName ;
102
+
103
+ /** @readonly */
104
+ public ?string $ baseURI ;
105
+
106
+ /** @var string */
107
+ public $ textContent = "" ;
108
+
44
109
/** @return DOMNode|false */
45
110
public function appendChild (DOMNode $ node ) {}
46
111
@@ -95,6 +160,29 @@ public function replaceChild(DOMNode $node, DOMNode $child) {}
95
160
96
161
class DOMNameSpaceNode
97
162
{
163
+ /** @readonly */
164
+ public string $ nodeName ;
165
+
166
+ /** @readonly */
167
+ public ?string $ nodeValue ;
168
+
169
+ /** @readonly */
170
+ public int $ nodeType ;
171
+
172
+ /** @readonly */
173
+ public string $ prefix ;
174
+
175
+ /** @readonly */
176
+ public ?string $ localName ;
177
+
178
+ /** @readonly */
179
+ public ?string $ namespaceURI ;
180
+
181
+ /** @readonly */
182
+ public ?DOMDocument $ ownerDocument ;
183
+
184
+ /** @readonly */
185
+ public ?DOMNode $ parentNode ;
98
186
}
99
187
100
188
class DOMImplementation
@@ -114,6 +202,15 @@ public function createDocument(?string $namespace = null, string $qualifiedName
114
202
115
203
class DOMDocumentFragment extends DOMNode implements DOMParentNode
116
204
{
205
+ /** @readonly */
206
+ public ?DOMElement $ firstElementChild ;
207
+
208
+ /** @readonly */
209
+ public ?DOMElement $ lastElementChild ;
210
+
211
+ /** @readonly */
212
+ public int $ childElementCount ;
213
+
117
214
public function __construct () {}
118
215
119
216
/** @return bool */
@@ -128,6 +225,9 @@ public function prepend(...$nodes): void {}
128
225
129
226
class DOMNodeList implements IteratorAggregate, Countable
130
227
{
228
+ /** @readonly */
229
+ public int $ length ;
230
+
131
231
/** @return int|false */
132
232
public function count () {}
133
233
@@ -139,6 +239,18 @@ public function item(int $index) {}
139
239
140
240
class DOMCharacterData extends DOMNode implements DOMChildNode
141
241
{
242
+ /** @readonly */
243
+ public string $ data ;
244
+
245
+ /** @readonly */
246
+ public int $ length ;
247
+
248
+ /** @readonly */
249
+ public ?DOMElement $ previousElementSibling ;
250
+
251
+ /** @readonly */
252
+ public ?DOMElement $ nextElementSibling ;
253
+
142
254
/** @return bool */
143
255
public function appendData (string $ data ) {}
144
256
@@ -168,6 +280,21 @@ public function after(...$nodes): void {}
168
280
169
281
class DOMAttr extends DOMNode
170
282
{
283
+ /** @readonly */
284
+ public string $ name ;
285
+
286
+ /** @readonly */
287
+ public bool $ specified = true ;
288
+
289
+ /** @readonly */
290
+ public string $ value ;
291
+
292
+ /** @readonly */
293
+ public ?DOMElement $ ownerElement ;
294
+
295
+ /** @readonly */
296
+ public mixed $ schemaTypeInfo = null ;
297
+
171
298
public function __construct (string $ name , string $ value = "" ) {}
172
299
173
300
/** @return bool */
@@ -176,6 +303,27 @@ public function isId() {}
176
303
177
304
class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
178
305
{
306
+ /** @readonly */
307
+ public string $ tagName ;
308
+
309
+ /** @readonly */
310
+ public mixed $ schemaTypeInfo = null ;
311
+
312
+ /** @readonly */
313
+ public ?DOMElement $ firstElementChild ;
314
+
315
+ /** @readonly */
316
+ public ?DOMElement $ lastElementChild ;
317
+
318
+ /** @readonly */
319
+ public int $ childElementCount ;
320
+
321
+ /** @readonly */
322
+ public ?DOMElement $ previousElementSibling ;
323
+
324
+ /** @readonly */
325
+ public ?DOMElement $ nextElementSibling ;
326
+
179
327
public function __construct (string $ qualifiedName , ?string $ value = null , string $ namespace = "" ) {}
180
328
181
329
/** @return string */
@@ -252,6 +400,78 @@ public function prepend(...$nodes): void {}
252
400
253
401
class DOMDocument extends DOMNode implements DOMParentNode
254
402
{
403
+ /** @readonly */
404
+ public ?DOMDocumentType $ doctype ;
405
+
406
+ /** @readonly */
407
+ public DOMImplementation $ implementation ;
408
+
409
+ /** @readonly */
410
+ public ?DOMElement $ documentElement ;
411
+
412
+ /**
413
+ * @readonly
414
+ * @deprecated
415
+ */
416
+ public ?string $ actualEncoding ;
417
+
418
+ /** @var string|null */
419
+ public $ encoding ;
420
+
421
+ /** @readonly */
422
+ public ?string $ xmlEncoding ;
423
+
424
+ /** @var bool */
425
+ public $ standalone = false ;
426
+
427
+ /** @var bool */
428
+ public $ xmlStandalone = false ;
429
+
430
+ /** @var string|null */
431
+ public $ version ;
432
+
433
+ /** @var string|null */
434
+ public $ xmlVersion ;
435
+
436
+ /** @var bool */
437
+ public $ strictErrorChecking = false ;
438
+
439
+ /** @var string|null */
440
+ public $ documentURI ;
441
+
442
+ /**
443
+ * @readonly
444
+ * @deprecated
445
+ */
446
+ public mixed $ config = null ;
447
+
448
+ /** @var bool */
449
+ public $ formatOutput = false ;
450
+
451
+ /** @var bool */
452
+ public $ validateOnParse = false ;
453
+
454
+ /** @var bool */
455
+ public $ resolveExternals = false ;
456
+
457
+ /** @var bool */
458
+ public $ preserveWhiteSpace = false ;
459
+
460
+ /** @var bool */
461
+ public $ recover = false ;
462
+
463
+ /** @var bool */
464
+ public $ substituteEntities = false ;
465
+
466
+ /** @readonly */
467
+ public ?DOMElement $ firstElementChild ;
468
+
469
+ /** @readonly */
470
+ public ?DOMElement $ lastElementChild ;
471
+
472
+ /** @readonly */
473
+ public int $ childElementCount ;
474
+
255
475
public function __construct (string $ version = "1.0 " , string $ encoding = "" ) {}
256
476
257
477
/** @return DOMAttr|false */
@@ -366,6 +586,9 @@ final class DOMException extends Exception
366
586
367
587
class DOMText extends DOMCharacterData
368
588
{
589
+ /** @readonly */
590
+ public string $ wholeText ;
591
+
369
592
public function __construct (string $ data = "" ) {}
370
593
371
594
/** @return bool */
@@ -383,6 +606,9 @@ public function splitText(int $offset) {}
383
606
384
607
class DOMNamedNodeMap implements IteratorAggregate, Countable
385
608
{
609
+ /** @readonly */
610
+ public int $ length ;
611
+
386
612
/** @return DOMNode|null */
387
613
public function getNamedItem (string $ qualifiedName ) {}
388
614
@@ -400,6 +626,23 @@ public function getIterator(): Iterator {}
400
626
401
627
class DOMEntity extends DOMNode
402
628
{
629
+ /** @readonly */
630
+ public ?string $ publicId ;
631
+
632
+ /** @readonly */
633
+ public ?string $ systemId ;
634
+
635
+ /** @readonly */
636
+ public ?string $ notationName ;
637
+
638
+ /** @readonly */
639
+ public mixed $ actualEncoding = null ;
640
+
641
+ /** @readonly */
642
+ public mixed $ encoding = null ;
643
+
644
+ /** @readonly */
645
+ public mixed $ version = null ;
403
646
}
404
647
405
648
class DOMEntityReference extends DOMNode
@@ -409,16 +652,33 @@ public function __construct(string $name) {}
409
652
410
653
class DOMNotation extends DOMNode
411
654
{
655
+ /** @readonly */
656
+ public string $ publicId ;
657
+
658
+ /** @readonly */
659
+ public string $ systemId ;
412
660
}
413
661
414
662
class DOMProcessingInstruction extends DOMNode
415
663
{
664
+ /** @readonly */
665
+ public string $ target ;
666
+
667
+ /** @var string */
668
+ public $ data = "" ;
669
+
416
670
public function __construct (string $ name , string $ value = "" ) {}
417
671
}
418
672
419
673
#ifdef LIBXML_XPATH_ENABLED
420
674
class DOMXPath
421
675
{
676
+ /** @readonly */
677
+ public DOMDocument $ document ;
678
+
679
+ /** @var bool */
680
+ public $ registerNodeNamespaces = false ;
681
+
422
682
public function __construct (DOMDocument $ document , bool $ registerNodeNS = true ) {}
423
683
424
684
/** @return mixed */
0 commit comments