4
4
5
5
class DOMDocumentType extends DOMNode
6
6
{
7
+ public string $ name ;
8
+
9
+ public DOMNamedNodeMap $ entities ;
10
+
11
+ public DOMNamedNodeMap $ notations ;
12
+
13
+ public string $ publicId ;
14
+
15
+ public string $ systemId ;
16
+
17
+ public ?string $ internalSubset ;
7
18
}
8
19
9
20
class DOMCdataSection extends DOMText
@@ -41,6 +52,41 @@ public function replaceWith(...$nodes): void;
41
52
42
53
class DOMNode
43
54
{
55
+ public string $ nodeName ;
56
+
57
+ /** @var string|null */
58
+ public $ nodeValue ;
59
+
60
+ public int $ nodeType ;
61
+
62
+ public ?DOMNode $ parentNode ;
63
+
64
+ public DOMNodeList $ childNodes ;
65
+
66
+ public ?DOMNode $ firstChild ;
67
+
68
+ public ?DOMNode $ lastChild ;
69
+
70
+ public ?DOMNode $ previousSibling ;
71
+
72
+ public ?DOMNode $ nextSibling ;
73
+
74
+ public ?DOMNamedNodeMap $ attributes ;
75
+
76
+ public ?DOMDocument $ ownerDocument ;
77
+
78
+ public ?string $ namespaceURI ;
79
+
80
+ /** @var string */
81
+ public $ prefix = "" ;
82
+
83
+ public ?string $ localName ;
84
+
85
+ public ?string $ baseURI ;
86
+
87
+ /** @var string */
88
+ public $ textContent = "" ;
89
+
44
90
/** @return DOMNode|false */
45
91
public function appendChild (DOMNode $ node ) {}
46
92
@@ -95,6 +141,21 @@ public function replaceChild(DOMNode $node, DOMNode $child) {}
95
141
96
142
class DOMNameSpaceNode
97
143
{
144
+ public string $ nodeName ;
145
+
146
+ public ?string $ nodeValue ;
147
+
148
+ public int $ nodeType ;
149
+
150
+ public string $ prefix ;
151
+
152
+ public ?string $ localName ;
153
+
154
+ public ?string $ namespaceURI ;
155
+
156
+ public ?DOMDocument $ ownerDocument ;
157
+
158
+ public ?DOMNode $ parentNode ;
98
159
}
99
160
100
161
class DOMImplementation
@@ -114,6 +175,12 @@ public function createDocument(?string $namespace = null, string $qualifiedName
114
175
115
176
class DOMDocumentFragment extends DOMNode implements DOMParentNode
116
177
{
178
+ public ?DOMElement $ firstElementChild ;
179
+
180
+ public ?DOMElement $ lastElementChild ;
181
+
182
+ public int $ childElementCount ;
183
+
117
184
public function __construct () {}
118
185
119
186
/** @return bool */
@@ -128,6 +195,8 @@ public function prepend(...$nodes): void {}
128
195
129
196
class DOMNodeList implements IteratorAggregate, Countable
130
197
{
198
+ public int $ length ;
199
+
131
200
/** @return int|false */
132
201
public function count () {}
133
202
@@ -139,6 +208,14 @@ public function item(int $index) {}
139
208
140
209
class DOMCharacterData extends DOMNode implements DOMChildNode
141
210
{
211
+ public string $ data ;
212
+
213
+ public int $ length ;
214
+
215
+ public ?DOMElement $ previousElementSibling ;
216
+
217
+ public ?DOMElement $ nextElementSibling ;
218
+
142
219
/** @return bool */
143
220
public function appendData (string $ data ) {}
144
221
@@ -168,6 +245,16 @@ public function after(...$nodes): void {}
168
245
169
246
class DOMAttr extends DOMNode
170
247
{
248
+ public string $ name ;
249
+
250
+ public bool $ specified = true ;
251
+
252
+ public string $ value ;
253
+
254
+ public ?DOMElement $ ownerElement ;
255
+
256
+ public mixed $ schemaTypeInfo = null ;
257
+
171
258
public function __construct (string $ name , string $ value = "" ) {}
172
259
173
260
/** @return bool */
@@ -176,6 +263,20 @@ public function isId() {}
176
263
177
264
class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
178
265
{
266
+ public string $ tagName ;
267
+
268
+ public mixed $ schemaTypeInfo = null ;
269
+
270
+ public ?DOMElement $ firstElementChild ;
271
+
272
+ public ?DOMElement $ lastElementChild ;
273
+
274
+ public int $ childElementCount ;
275
+
276
+ public ?DOMElement $ previousElementSibling ;
277
+
278
+ public ?DOMElement $ nextElementSibling ;
279
+
179
280
public function __construct (string $ qualifiedName , ?string $ value = null , string $ namespace = "" ) {}
180
281
181
282
/** @return string */
@@ -252,6 +353,65 @@ public function prepend(...$nodes): void {}
252
353
253
354
class DOMDocument extends DOMNode implements DOMParentNode
254
355
{
356
+ public ?DOMDocumentType $ doctype ;
357
+
358
+ public DOMImplementation $ implementation ;
359
+
360
+ public ?DOMElement $ documentElement ;
361
+
362
+ /** @deprecated */
363
+ public ?string $ actualEncoding ;
364
+
365
+ /** @var string|null */
366
+ public $ encoding ;
367
+
368
+ public ?string $ xmlEncoding ;
369
+
370
+ /** @var bool */
371
+ public $ standalone = false ;
372
+
373
+ /** @var bool */
374
+ public bool $ xmlStandalone = false ;
375
+
376
+ /** @var string|null */
377
+ public $ version ;
378
+
379
+ /** @var string|null */
380
+ public $ xmlVersion ;
381
+
382
+ /** @var bool */
383
+ public $ strictErrorChecking = false ;
384
+
385
+ /** @var string|null */
386
+ public $ documentURI ;
387
+
388
+ /** @deprecated */
389
+ public mixed $ config = null ;
390
+
391
+ /** @var bool */
392
+ public $ formatOutput = false ;
393
+
394
+ /** @var bool */
395
+ public $ validateOnParse = false ;
396
+
397
+ /** @var bool */
398
+ public $ resolveExternals = false ;
399
+
400
+ /** @var bool */
401
+ public $ preserveWhiteSpace = false ;
402
+
403
+ /** @var bool */
404
+ public $ recover = false ;
405
+
406
+ /** @var bool */
407
+ public $ substituteEntities = false ;
408
+
409
+ public ?DOMElement $ firstElementChild ;
410
+
411
+ public ?DOMElement $ lastElementChild ;
412
+
413
+ public int $ childElementCount ;
414
+
255
415
public function __construct (string $ version = "1.0 " , string $ encoding = "" ) {}
256
416
257
417
/** @return DOMAttr|false */
@@ -366,6 +526,8 @@ final class DOMException extends Exception
366
526
367
527
class DOMText extends DOMCharacterData
368
528
{
529
+ public string $ wholeText ;
530
+
369
531
public function __construct (string $ data = "" ) {}
370
532
371
533
/** @return bool */
@@ -383,6 +545,8 @@ public function splitText(int $offset) {}
383
545
384
546
class DOMNamedNodeMap implements IteratorAggregate, Countable
385
547
{
548
+ public int $ length ;
549
+
386
550
/** @return DOMNode|null */
387
551
public function getNamedItem (string $ qualifiedName ) {}
388
552
@@ -400,6 +564,17 @@ public function getIterator(): Iterator {}
400
564
401
565
class DOMEntity extends DOMNode
402
566
{
567
+ public ?string $ publicId ;
568
+
569
+ public ?string $ systemId ;
570
+
571
+ public ?string $ notationName ;
572
+
573
+ public mixed $ actualEncoding = null ;
574
+
575
+ public mixed $ encoding = null ;
576
+
577
+ public mixed $ version = null ;
403
578
}
404
579
405
580
class DOMEntityReference extends DOMNode
@@ -409,16 +584,29 @@ public function __construct(string $name) {}
409
584
410
585
class DOMNotation extends DOMNode
411
586
{
587
+ public string $ publicId ;
588
+
589
+ public string $ systemId ;
412
590
}
413
591
414
592
class DOMProcessingInstruction extends DOMNode
415
593
{
594
+ public string $ target ;
595
+
596
+ /** @var string */
597
+ public $ data = "" ;
598
+
416
599
public function __construct (string $ name , string $ value = "" ) {}
417
600
}
418
601
419
602
#ifdef LIBXML_XPATH_ENABLED
420
603
class DOMXPath
421
604
{
605
+ public DOMDocument $ document ;
606
+
607
+ /** @var bool */
608
+ public $ registerNodeNamespaces = false ;
609
+
422
610
public function __construct (DOMDocument $ document , bool $ registerNodeNS = true ) {}
423
611
424
612
/** @return mixed */
0 commit comments