1<?php 2 3/** @generate-class-entries */ 4 5/** 6 * @var int 7 * @cvalue XML_ELEMENT_NODE 8 */ 9const XML_ELEMENT_NODE = UNKNOWN; 10/** 11 * @var int 12 * @cvalue XML_ATTRIBUTE_NODE 13 */ 14const XML_ATTRIBUTE_NODE = UNKNOWN; 15/** 16 * @var int 17 * @cvalue XML_TEXT_NODE 18 */ 19const XML_TEXT_NODE = UNKNOWN; 20/** 21 * @var int 22 * @cvalue XML_CDATA_SECTION_NODE 23 */ 24const XML_CDATA_SECTION_NODE = UNKNOWN; 25/** 26 * @var int 27 * @cvalue XML_ENTITY_REF_NODE 28 */ 29const XML_ENTITY_REF_NODE = UNKNOWN; 30/** 31 * @var int 32 * @cvalue XML_ENTITY_NODE 33 */ 34const XML_ENTITY_NODE = UNKNOWN; 35/** 36 * @var int 37 * @cvalue XML_PI_NODE 38 */ 39const XML_PI_NODE = UNKNOWN; 40/** 41 * @var int 42 * @cvalue XML_COMMENT_NODE 43 */ 44const XML_COMMENT_NODE = UNKNOWN; 45/** 46 * @var int 47 * @cvalue XML_DOCUMENT_NODE 48 */ 49const XML_DOCUMENT_NODE = UNKNOWN; 50/** 51 * @var int 52 * @cvalue XML_DOCUMENT_TYPE_NODE 53 */ 54const XML_DOCUMENT_TYPE_NODE = UNKNOWN; 55/** 56 * @var int 57 * @cvalue XML_DOCUMENT_FRAG_NODE 58 */ 59const XML_DOCUMENT_FRAG_NODE = UNKNOWN; 60/** 61 * @var int 62 * @cvalue XML_NOTATION_NODE 63 */ 64const XML_NOTATION_NODE = UNKNOWN; 65/** 66 * @var int 67 * @cvalue XML_HTML_DOCUMENT_NODE 68 */ 69const XML_HTML_DOCUMENT_NODE = UNKNOWN; 70/** 71 * @var int 72 * @cvalue XML_DTD_NODE 73 */ 74const XML_DTD_NODE = UNKNOWN; 75/** 76 * @var int 77 * @cvalue XML_ELEMENT_DECL 78 */ 79const XML_ELEMENT_DECL_NODE = UNKNOWN; 80/** 81 * @var int 82 * @cvalue XML_ATTRIBUTE_DECL 83 */ 84const XML_ATTRIBUTE_DECL_NODE = UNKNOWN; 85/** 86 * @var int 87 * @cvalue XML_ENTITY_DECL 88 */ 89const XML_ENTITY_DECL_NODE = UNKNOWN; 90/** 91 * @var int 92 * @cvalue XML_NAMESPACE_DECL 93 */ 94const XML_NAMESPACE_DECL_NODE = UNKNOWN; 95#ifdef XML_GLOBAL_NAMESPACE 96/** 97 * @var int 98 * @cvalue XML_GLOBAL_NAMESPACE 99 */ 100const XML_GLOBAL_NAMESPACE = UNKNOWN; 101#endif 102 103/** 104 * @var int 105 * @cvalue XML_LOCAL_NAMESPACE 106 */ 107const XML_LOCAL_NAMESPACE = UNKNOWN; 108/** 109 * @var int 110 * @cvalue XML_ATTRIBUTE_CDATA 111 */ 112const XML_ATTRIBUTE_CDATA = UNKNOWN; 113/** 114 * @var int 115 * @cvalue XML_ATTRIBUTE_ID 116 */ 117const XML_ATTRIBUTE_ID = UNKNOWN; 118/** 119 * @var int 120 * @cvalue XML_ATTRIBUTE_IDREF 121 */ 122const XML_ATTRIBUTE_IDREF = UNKNOWN; 123/** 124 * @var int 125 * @cvalue XML_ATTRIBUTE_IDREFS 126 */ 127const XML_ATTRIBUTE_IDREFS = UNKNOWN; 128/** 129 * @var int 130 * @cvalue XML_ATTRIBUTE_ENTITIES 131 */ 132const XML_ATTRIBUTE_ENTITY = UNKNOWN; 133/** 134 * @var int 135 * @cvalue XML_ATTRIBUTE_NMTOKEN 136 */ 137const XML_ATTRIBUTE_NMTOKEN = UNKNOWN; 138/** 139 * @var int 140 * @cvalue XML_ATTRIBUTE_NMTOKENS 141 */ 142const XML_ATTRIBUTE_NMTOKENS = UNKNOWN; 143/** 144 * @var int 145 * @cvalue XML_ATTRIBUTE_ENUMERATION 146 */ 147const XML_ATTRIBUTE_ENUMERATION = UNKNOWN; 148/** 149 * @var int 150 * @cvalue XML_ATTRIBUTE_NOTATION 151 */ 152const XML_ATTRIBUTE_NOTATION = UNKNOWN; 153 154/** 155 * @var int 156 * @cvalue PHP_ERR 157 */ 158const DOM_PHP_ERR = UNKNOWN; 159/** 160 * @var int 161 * @cvalue INDEX_SIZE_ERR 162 */ 163const DOM_INDEX_SIZE_ERR = UNKNOWN; 164/** 165 * @var int 166 * @cvalue DOMSTRING_SIZE_ERR 167 */ 168const DOMSTRING_SIZE_ERR = UNKNOWN; 169/** 170 * @var int 171 * @cvalue HIERARCHY_REQUEST_ERR 172 */ 173const DOM_HIERARCHY_REQUEST_ERR = UNKNOWN; 174/** 175 * @var int 176 * @cvalue WRONG_DOCUMENT_ERR 177 */ 178const DOM_WRONG_DOCUMENT_ERR = UNKNOWN; 179/** 180 * @var int 181 * @cvalue INVALID_CHARACTER_ERR 182 */ 183const DOM_INVALID_CHARACTER_ERR = UNKNOWN; 184/** 185 * @var int 186 * @cvalue NO_DATA_ALLOWED_ERR 187 */ 188const DOM_NO_DATA_ALLOWED_ERR = UNKNOWN; 189/** 190 * @var int 191 * @cvalue NO_MODIFICATION_ALLOWED_ERR 192 */ 193const DOM_NO_MODIFICATION_ALLOWED_ERR = UNKNOWN; 194/** 195 * @var int 196 * @cvalue NOT_FOUND_ERR 197 */ 198const DOM_NOT_FOUND_ERR = UNKNOWN; 199/** 200 * @var int 201 * @cvalue NOT_SUPPORTED_ERR 202 */ 203const DOM_NOT_SUPPORTED_ERR = UNKNOWN; 204/** 205 * @var int 206 * @cvalue INUSE_ATTRIBUTE_ERR 207 */ 208const DOM_INUSE_ATTRIBUTE_ERR = UNKNOWN; 209/** 210 * @var int 211 * @cvalue INVALID_STATE_ERR 212 */ 213const DOM_INVALID_STATE_ERR = UNKNOWN; 214/** 215 * @var int 216 * @cvalue SYNTAX_ERR 217 */ 218const DOM_SYNTAX_ERR = UNKNOWN; 219/** 220 * @var int 221 * @cvalue INVALID_MODIFICATION_ERR 222 */ 223const DOM_INVALID_MODIFICATION_ERR = UNKNOWN; 224/** 225 * @var int 226 * @cvalue NAMESPACE_ERR 227 */ 228const DOM_NAMESPACE_ERR = UNKNOWN; 229/** 230 * @var int 231 * @cvalue INVALID_ACCESS_ERR 232 */ 233const DOM_INVALID_ACCESS_ERR = UNKNOWN; 234/** 235 * @var int 236 * @cvalue VALIDATION_ERR 237 */ 238const DOM_VALIDATION_ERR = UNKNOWN; 239 240class DOMDocumentType extends DOMNode 241{ 242 /** @readonly */ 243 public string $name; 244 245 /** @readonly */ 246 public DOMNamedNodeMap $entities; 247 248 /** @readonly */ 249 public DOMNamedNodeMap $notations; 250 251 /** @readonly */ 252 public string $publicId; 253 254 /** @readonly */ 255 public string $systemId; 256 257 /** @readonly */ 258 public ?string $internalSubset; 259} 260 261class DOMCdataSection extends DOMText 262{ 263 public function __construct(string $data) {} 264} 265 266class DOMComment extends DOMCharacterData 267{ 268 public function __construct(string $data = "") {} 269} 270 271interface DOMParentNode 272{ 273 /** @param DOMNode|string $nodes */ 274 public function append(...$nodes): void; 275 276 /** @param DOMNode|string $nodes */ 277 public function prepend(...$nodes): void; 278 279 /** @param DOMNode|string $nodes */ 280 public function replaceChildren(...$nodes): void; 281} 282 283interface DOMChildNode 284{ 285 public function remove(): void; 286 287 /** @param DOMNode|string $nodes */ 288 public function before(... $nodes): void; 289 290 /** @param DOMNode|string $nodes */ 291 public function after(...$nodes): void; 292 293 /** @param DOMNode|string $nodes */ 294 public function replaceWith(...$nodes): void; 295} 296 297class DOMNode 298{ 299 /** @readonly */ 300 public string $nodeName; 301 302 public ?string $nodeValue; 303 304 /** @readonly */ 305 public int $nodeType; 306 307 /** @readonly */ 308 public ?DOMNode $parentNode; 309 310 /** @readonly */ 311 public ?DOMElement $parentElement; 312 313 /** @readonly */ 314 public DOMNodeList $childNodes; 315 316 /** @readonly */ 317 public ?DOMNode $firstChild; 318 319 /** @readonly */ 320 public ?DOMNode $lastChild; 321 322 /** @readonly */ 323 public ?DOMNode $previousSibling; 324 325 /** @readonly */ 326 public ?DOMNode $nextSibling; 327 328 /** @readonly */ 329 public ?DOMNamedNodeMap $attributes; 330 331 /** @readonly */ 332 public bool $isConnected; 333 334 /** @readonly */ 335 public ?DOMDocument $ownerDocument; 336 337 /** @readonly */ 338 public ?string $namespaceURI; 339 340 public string $prefix; 341 342 /** @readonly */ 343 public ?string $localName; 344 345 /** @readonly */ 346 public ?string $baseURI; 347 348 public string $textContent; 349 350 public function __sleep(): array {} 351 352 public function __wakeup(): void {} 353 354 /** @return DOMNode|false */ 355 public function appendChild(DOMNode $node) {} 356 357 /** @tentative-return-type */ 358 public function C14N(bool $exclusive = false, bool $withComments = false, ?array $xpath = null, ?array $nsPrefixes = null): string|false {} 359 360 /** @tentative-return-type */ 361 public function C14NFile(string $uri, bool $exclusive = false, bool $withComments = false, ?array $xpath = null, ?array $nsPrefixes = null): int|false {} 362 363 /** @return DOMNode|false */ 364 public function cloneNode(bool $deep = false) {} 365 366 /** @tentative-return-type */ 367 public function getLineNo(): int {} 368 369 /** @tentative-return-type */ 370 public function getNodePath(): ?string {} 371 372 /** @tentative-return-type */ 373 public function hasAttributes(): bool {} 374 375 /** @tentative-return-type */ 376 public function hasChildNodes(): bool {} 377 378 /** @return DOMNode|false */ 379 public function insertBefore(DOMNode $node, ?DOMNode $child = null) {} 380 381 /** @tentative-return-type */ 382 public function isDefaultNamespace(string $namespace): bool {} 383 384 /** @tentative-return-type */ 385 public function isSameNode(DOMNode $otherNode): bool {} 386 387 public function isEqualNode(?DOMNode $otherNode): bool {} 388 389 /** @tentative-return-type */ 390 public function isSupported(string $feature, string $version): bool {} 391 392 /** @tentative-return-type */ 393 public function lookupNamespaceURI(?string $prefix): ?string {} 394 395 /** @tentative-return-type */ 396 public function lookupPrefix(string $namespace): ?string {} 397 398 /** @tentative-return-type */ 399 public function normalize(): void {} 400 401 /** @return DOMNode|false */ 402 public function removeChild(DOMNode $child) {} 403 404 /** @return DOMNode|false */ 405 public function replaceChild(DOMNode $node, DOMNode $child) {} 406 407 public function contains(DOMNode|DOMNameSpaceNode|null $other): bool {} 408 409 public function getRootNode(?array $options = null): DOMNode {} 410} 411 412class DOMNameSpaceNode 413{ 414 /** @readonly */ 415 public string $nodeName; 416 417 /** @readonly */ 418 public ?string $nodeValue; 419 420 /** @readonly */ 421 public int $nodeType; 422 423 /** @readonly */ 424 public string $prefix; 425 426 /** @readonly */ 427 public ?string $localName; 428 429 /** @readonly */ 430 public ?string $namespaceURI; 431 432 /** @readonly */ 433 public bool $isConnected; 434 435 /** @readonly */ 436 public ?DOMDocument $ownerDocument; 437 438 /** @readonly */ 439 public ?DOMNode $parentNode; 440 441 /** @readonly */ 442 public ?DOMElement $parentElement; 443 444 /** @implementation-alias DOMNode::__sleep */ 445 public function __sleep(): array {} 446 447 /** @implementation-alias DOMNode::__wakeup */ 448 public function __wakeup(): void {} 449} 450 451class DOMImplementation 452{ 453 /** @tentative-return-type */ 454 public function getFeature(string $feature, string $version): never {} 455 456 /** @tentative-return-type */ 457 public function hasFeature(string $feature, string $version): bool {} 458 459 /** @return DOMDocumentType|false */ 460 public function createDocumentType(string $qualifiedName, string $publicId = "", string $systemId = "") {} 461 462 /** @return DOMDocument|false */ 463 public function createDocument(?string $namespace = null, string $qualifiedName = "", ?DOMDocumentType $doctype = null) {} 464} 465 466class DOMDocumentFragment extends DOMNode implements DOMParentNode 467{ 468 /** @readonly */ 469 public ?DOMElement $firstElementChild; 470 471 /** @readonly */ 472 public ?DOMElement $lastElementChild; 473 474 /** @readonly */ 475 public int $childElementCount; 476 477 public function __construct() {} 478 479 /** @tentative-return-type */ 480 public function appendXML(string $data): bool {} 481 482 /** @param DOMNode|string $nodes */ 483 public function append(...$nodes): void {} 484 485 /** @param DOMNode|string $nodes */ 486 public function prepend(...$nodes): void {} 487 488 /** @param DOMNode|string $nodes */ 489 public function replaceChildren(...$nodes): void {} 490} 491 492class DOMNodeList implements IteratorAggregate, Countable 493{ 494 /** @readonly */ 495 public int $length; 496 497 /** @tentative-return-type */ 498 public function count(): int {} 499 500 public function getIterator(): Iterator {} 501 502 /** @return DOMElement|DOMNode|DOMNameSpaceNode|null */ 503 public function item(int $index) {} 504} 505 506class DOMCharacterData extends DOMNode implements DOMChildNode 507{ 508 public string $data; 509 510 /** @readonly */ 511 public int $length; 512 513 /** @readonly */ 514 public ?DOMElement $previousElementSibling; 515 516 /** @readonly */ 517 public ?DOMElement $nextElementSibling; 518 519 /** @tentative-return-type */ 520 public function appendData(string $data): true {} 521 522 /** @return string|false */ 523 public function substringData(int $offset, int $count) {} 524 525 /** @tentative-return-type */ 526 public function insertData(int $offset, string $data): bool {} 527 528 /** @tentative-return-type */ 529 public function deleteData(int $offset, int $count): bool {} 530 531 /** @tentative-return-type */ 532 public function replaceData(int $offset, int $count, string $data): bool {} 533 534 /** @param DOMNode|string $nodes */ 535 public function replaceWith(...$nodes): void {} 536 537 public function remove(): void {} 538 539 /** @param DOMNode|string $nodes */ 540 public function before(... $nodes): void {} 541 542 /** @param DOMNode|string $nodes */ 543 public function after(...$nodes): void {} 544} 545 546class DOMAttr extends DOMNode 547{ 548 /** @readonly */ 549 public string $name; 550 551 /** @readonly */ 552 public bool $specified = true; 553 554 public string $value; 555 556 /** @readonly */ 557 public ?DOMElement $ownerElement; 558 559 /** @readonly */ 560 public mixed $schemaTypeInfo = null; 561 562 public function __construct(string $name, string $value = "") {} 563 564 /** @tentative-return-type */ 565 public function isId(): bool {} 566} 567 568class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode 569{ 570 /** @readonly */ 571 public string $tagName; 572 573 public string $className; 574 575 public string $id; 576 577 /** @readonly */ 578 public mixed $schemaTypeInfo = null; 579 580 /** @readonly */ 581 public ?DOMElement $firstElementChild; 582 583 /** @readonly */ 584 public ?DOMElement $lastElementChild; 585 586 /** @readonly */ 587 public int $childElementCount; 588 589 /** @readonly */ 590 public ?DOMElement $previousElementSibling; 591 592 /** @readonly */ 593 public ?DOMElement $nextElementSibling; 594 595 public function __construct(string $qualifiedName, ?string $value = null, string $namespace = "") {} 596 597 /** @tentative-return-type */ 598 public function getAttribute(string $qualifiedName): string {} 599 600 public function getAttributeNames(): array {} 601 602 /** @tentative-return-type */ 603 public function getAttributeNS(?string $namespace, string $localName): string {} 604 605 /** @return DOMAttr|DOMNameSpaceNode|false */ 606 public function getAttributeNode(string $qualifiedName) {} 607 608 /** @return DOMAttr|DOMNameSpaceNode|null */ 609 public function getAttributeNodeNS(?string $namespace, string $localName) {} 610 611 /** @tentative-return-type */ 612 public function getElementsByTagName(string $qualifiedName): DOMNodeList {} 613 614 /** @tentative-return-type */ 615 public function getElementsByTagNameNS(?string $namespace, string $localName): DOMNodeList {} 616 617 /** @tentative-return-type */ 618 public function hasAttribute(string $qualifiedName): bool {} 619 620 /** @tentative-return-type */ 621 public function hasAttributeNS(?string $namespace, string $localName): bool {} 622 623 /** @tentative-return-type */ 624 public function removeAttribute(string $qualifiedName): bool {} 625 626 /** @tentative-return-type */ 627 public function removeAttributeNS(?string $namespace, string $localName): void {} 628 629 /** @return DOMAttr|false */ 630 public function removeAttributeNode(DOMAttr $attr) {} 631 632 /** @return DOMAttr|bool */ 633 public function setAttribute(string $qualifiedName, string $value) {} // TODO return type shouldn't depend on the call scope 634 635 /** @tentative-return-type */ 636 public function setAttributeNS(?string $namespace, string $qualifiedName, string $value): void {} 637 638 /** @return DOMAttr|null|false */ 639 public function setAttributeNode(DOMAttr $attr) {} 640 641 /** @return DOMAttr|null|false */ 642 public function setAttributeNodeNS(DOMAttr $attr) {} 643 644 /** @tentative-return-type */ 645 public function setIdAttribute(string $qualifiedName, bool $isId): void {} 646 647 /** @tentative-return-type */ 648 public function setIdAttributeNS(string $namespace, string $qualifiedName, bool $isId): void {} 649 650 /** @tentative-return-type */ 651 public function setIdAttributeNode(DOMAttr $attr, bool $isId): void {} 652 653 public function toggleAttribute(string $qualifiedName, ?bool $force = null): bool {} 654 655 public function remove(): void {} 656 657 /** @param DOMNode|string $nodes */ 658 public function before(... $nodes): void {} 659 660 /** @param DOMNode|string $nodes */ 661 public function after(...$nodes): void {} 662 663 /** @param DOMNode|string $nodes */ 664 public function replaceWith(...$nodes): void {} 665 666 /** @param DOMNode|string $nodes */ 667 public function append(...$nodes): void {} 668 669 /** @param DOMNode|string $nodes */ 670 public function prepend(...$nodes): void {} 671 672 /** @param DOMNode|string $nodes */ 673 public function replaceChildren(...$nodes): void {} 674 675 public function insertAdjacentElement(string $where, DOMElement $element): ?DOMElement {} 676 677 public function insertAdjacentText(string $where, string $data): void {} 678} 679 680class DOMDocument extends DOMNode implements DOMParentNode 681{ 682 /** @readonly */ 683 public ?DOMDocumentType $doctype; 684 685 /** @readonly */ 686 public DOMImplementation $implementation; 687 688 /** @readonly */ 689 public ?DOMElement $documentElement; 690 691 /** 692 * @readonly 693 * @deprecated 694 */ 695 public ?string $actualEncoding; 696 697 public ?string $encoding; 698 699 /** @readonly */ 700 public ?string $xmlEncoding; 701 702 public bool $standalone; 703 704 public bool $xmlStandalone; 705 706 public ?string $version; 707 708 public ?string $xmlVersion; 709 710 public bool $strictErrorChecking; 711 712 public ?string $documentURI; 713 714 /** 715 * @readonly 716 * @deprecated 717 */ 718 public mixed $config; 719 720 public bool $formatOutput; 721 722 public bool $validateOnParse; 723 724 public bool $resolveExternals; 725 726 public bool $preserveWhiteSpace; 727 728 public bool $recover; 729 730 public bool $substituteEntities; 731 732 /** @readonly */ 733 public ?DOMElement $firstElementChild; 734 735 /** @readonly */ 736 public ?DOMElement $lastElementChild; 737 738 /** @readonly */ 739 public int $childElementCount; 740 741 public function __construct(string $version = "1.0", string $encoding = "") {} 742 743 /** @return DOMAttr|false */ 744 public function createAttribute(string $localName) {} 745 746 /** @return DOMAttr|false */ 747 public function createAttributeNS(?string $namespace, string $qualifiedName) {} 748 749 /** @return DOMCdataSection|false */ 750 public function createCDATASection(string $data) {} 751 752 /** @tentative-return-type */ 753 public function createComment(string $data): DOMComment {} 754 755 /** @tentative-return-type */ 756 public function createDocumentFragment(): DOMDocumentFragment {} 757 758 /** @return DOMElement|false */ 759 public function createElement(string $localName, string $value = "") {} 760 761 /** @return DOMElement|false */ 762 public function createElementNS(?string $namespace, string $qualifiedName, string $value = "") {} 763 764 /** @return DOMEntityReference|false */ 765 public function createEntityReference(string $name) {} 766 767 /** @return DOMProcessingInstruction|false */ 768 public function createProcessingInstruction(string $target, string $data = "") {} 769 770 /** @tentative-return-type */ 771 public function createTextNode(string $data): DOMText {} 772 773 /** @tentative-return-type */ 774 public function getElementById(string $elementId): ?DOMElement {} 775 776 /** @tentative-return-type */ 777 public function getElementsByTagName(string $qualifiedName): DOMNodeList {} 778 779 /** @tentative-return-type */ 780 public function getElementsByTagNameNS(?string $namespace, string $localName): DOMNodeList {} 781 782 /** @return DOMNode|false */ 783 public function importNode(DOMNode $node, bool $deep = false) {} 784 785 /** @tentative-return-type */ 786 public function load(string $filename, int $options = 0): bool {} 787 788 /** @tentative-return-type */ 789 public function loadXML(string $source, int $options = 0): bool {} 790 791 /** @tentative-return-type */ 792 public function normalizeDocument(): void {} 793 794 /** @tentative-return-type */ 795 public function registerNodeClass(string $baseClass, ?string $extendedClass): bool {} 796 797 /** @tentative-return-type */ 798 public function save(string $filename, int $options = 0): int|false {} 799 800#ifdef LIBXML_HTML_ENABLED 801 /** @tentative-return-type */ 802 public function loadHTML(string $source, int $options = 0): bool {} 803 804 /** @tentative-return-type */ 805 public function loadHTMLFile(string $filename, int $options = 0): bool {} 806 807 /** @tentative-return-type */ 808 public function saveHTML(?DOMNode $node = null): string|false {} 809 810 /** @tentative-return-type */ 811 public function saveHTMLFile(string $filename): int|false {} 812#endif 813 814 /** @tentative-return-type */ 815 public function saveXML(?DOMNode $node = null, int $options = 0): string|false {} 816 817#ifdef LIBXML_SCHEMAS_ENABLED 818 /** @tentative-return-type */ 819 public function schemaValidate(string $filename, int $flags = 0): bool {} 820 821 /** @tentative-return-type */ 822 public function schemaValidateSource(string $source, int $flags = 0): bool {} 823 824 /** @tentative-return-type */ 825 public function relaxNGValidate(string $filename): bool {} 826 827 /** @tentative-return-type */ 828 public function relaxNGValidateSource(string $source): bool {} 829#endif 830 831 /** @tentative-return-type */ 832 public function validate(): bool {} 833 834 /** @tentative-return-type */ 835 public function xinclude(int $options = 0): int|false {} 836 837 /** @tentative-return-type */ 838 public function adoptNode(DOMNode $node): DOMNode|false {} 839 840 /** @param DOMNode|string $nodes */ 841 public function append(...$nodes): void {} 842 843 /** @param DOMNode|string $nodes */ 844 public function prepend(...$nodes): void {} 845 846 /** @param DOMNode|string $nodes */ 847 public function replaceChildren(...$nodes): void {} 848} 849 850final class DOMException extends Exception 851{ 852 /** 853 * Intentionally left untyped for BC reasons 854 * @var int 855 */ 856 public $code = 0; // TODO add proper type (i.e. int|string) 857} 858 859class DOMText extends DOMCharacterData 860{ 861 /** @readonly */ 862 public string $wholeText; 863 864 public function __construct(string $data = "") {} 865 866 /** @tentative-return-type */ 867 public function isWhitespaceInElementContent(): bool {} 868 869 /** 870 * @tentative-return-type 871 * @alias DOMText::isWhitespaceInElementContent 872 */ 873 public function isElementContentWhitespace(): bool {} 874 875 /** @return DOMText|false */ 876 public function splitText(int $offset) {} 877} 878 879class DOMNamedNodeMap implements IteratorAggregate, Countable 880{ 881 /** @readonly */ 882 public int $length; 883 884 /** @tentative-return-type */ 885 public function getNamedItem(string $qualifiedName): ?DOMNode {} // TODO DOM spec returns DOMAttr 886 887 /** @tentative-return-type */ 888 public function getNamedItemNS(?string $namespace, string $localName): ?DOMNode {} // TODO DOM spec returns DOMAttr 889 890 /** @tentative-return-type */ 891 public function item(int $index): ?DOMNode {} // TODO DOM spec returns DOMAttr 892 893 /** @tentative-return-type */ 894 public function count(): int {} 895 896 public function getIterator(): Iterator {} 897} 898 899class DOMEntity extends DOMNode 900{ 901 /** @readonly */ 902 public ?string $publicId; 903 904 /** @readonly */ 905 public ?string $systemId; 906 907 /** @readonly */ 908 public ?string $notationName; 909 910 /** 911 * @readonly 912 * @deprecated 913 */ 914 public ?string $actualEncoding = null; 915 916 /** 917 * @readonly 918 * @deprecated 919 */ 920 public ?string $encoding = null; 921 922 /** 923 * @readonly 924 * @deprecated 925 */ 926 public ?string $version = null; 927} 928 929class DOMEntityReference extends DOMNode 930{ 931 public function __construct(string $name) {} 932} 933 934class DOMNotation extends DOMNode 935{ 936 /** @readonly */ 937 public string $publicId; 938 939 /** @readonly */ 940 public string $systemId; 941} 942 943class DOMProcessingInstruction extends DOMNode 944{ 945 /** @readonly */ 946 public string $target; 947 948 public string $data; 949 950 public function __construct(string $name, string $value = "") {} 951} 952 953#ifdef LIBXML_XPATH_ENABLED 954/** @not-serializable */ 955class DOMXPath 956{ 957 /** @readonly */ 958 public DOMDocument $document; 959 960 public bool $registerNodeNamespaces; 961 962 public function __construct(DOMDocument $document, bool $registerNodeNS = true) {} 963 964 /** @tentative-return-type */ 965 public function evaluate(string $expression, ?DOMNode $contextNode = null, bool $registerNodeNS = true): mixed {} 966 967 /** @tentative-return-type */ 968 public function query(string $expression, ?DOMNode $contextNode = null, bool $registerNodeNS = true): mixed {} 969 970 /** @tentative-return-type */ 971 public function registerNamespace(string $prefix, string $namespace): bool {} 972 973 /** @tentative-return-type */ 974 public function registerPhpFunctions(string|array|null $restrict = null): void {} 975} 976#endif 977 978function dom_import_simplexml(object $node): DOMAttr|DOMElement {} 979