*/ public function getInScopeNamespaces(): array {} /** @return list */ public function getDescendantNamespaces(): array {} public function rename(?string $namespaceURI, string $qualifiedName): void {} } class HTMLElement extends Element { } class Attr extends Node { /** * @readonly * @virtual */ public ?string $namespaceURI; /** * @readonly * @virtual */ public ?string $prefix; /** * @readonly * @virtual */ public string $localName; /** * @readonly * @virtual */ public string $name; /** @virtual */ public string $value; /** * @readonly * @virtual */ public ?Element $ownerElement; /** * @readonly * @virtual */ public bool $specified; /** @implementation-alias DOMAttr::isId */ public function isId(): bool {} /** @implementation-alias Dom\Element::rename */ public function rename(?string $namespaceURI, string $qualifiedName): void {} } class CharacterData extends Node implements ChildNode { /** * @readonly * @virtual */ public ?Element $previousElementSibling; /** * @readonly * @virtual */ public ?Element $nextElementSibling; /** @virtual */ public string $data; /** * @readonly * @virtual */ public int $length; /** @implementation-alias DOMCharacterData::substringData */ public function substringData(int $offset, int $count): string {} public function appendData(string $data): void {} public function insertData(int $offset, string $data): void {} public function deleteData(int $offset, int $count): void {} public function replaceData(int $offset, int $count, string $data): void {} /** @implementation-alias DOMElement::remove */ public function remove(): void {} /** @implementation-alias DOMElement::before */ public function before(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::after */ public function after(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::replaceWith */ public function replaceWith(Node|string ...$nodes): void {} } class Text extends CharacterData { /* No constructor because Node has a final private constructor, so PHP does not allow overriding that. */ /** @implementation-alias DOMText::splitText */ public function splitText(int $offset): Text {} /** * @readonly * @virtual */ public string $wholeText; } class CDATASection extends Text {} class ProcessingInstruction extends CharacterData { /** * @readonly * @virtual */ public string $target; } class Comment extends CharacterData { /* No constructor because Node has a final private constructor, so PHP does not allow overriding that. */ } class DocumentType extends Node implements ChildNode { /** * @readonly * @virtual */ public string $name; /** * @readonly * @virtual */ public DtdNamedNodeMap $entities; /** * @readonly * @virtual */ public DtdNamedNodeMap $notations; /** * @readonly * @virtual */ public string $publicId; /** * @readonly * @virtual */ public string $systemId; /** * @readonly * @virtual */ public ?string $internalSubset; /** @implementation-alias DOMElement::remove */ public function remove(): void {} /** @implementation-alias DOMElement::before */ public function before(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::after */ public function after(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::replaceWith */ public function replaceWith(Node|string ...$nodes): void {} } class DocumentFragment extends Node implements ParentNode { /** * @readonly * @virtual */ public ?Element $firstElementChild; /** * @readonly * @virtual */ public ?Element $lastElementChild; /** * @readonly * @virtual */ public int $childElementCount; /** @implementation-alias DOMDocumentFragment::appendXML */ public function appendXml(string $data): bool {} /** @implementation-alias DOMElement::append */ public function append(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::prepend */ public function prepend(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::replaceChildren */ public function replaceChildren(Node|string ...$nodes): void {} /** @implementation-alias Dom\Element::querySelector */ public function querySelector(string $selectors): ?Element {} /** @implementation-alias Dom\Element::querySelectorAll */ public function querySelectorAll(string $selectors): NodeList {} } class Entity extends Node { /** * @readonly * @virtual */ public ?string $publicId; /** * @readonly * @virtual */ public ?string $systemId; /** * @readonly * @virtual */ public ?string $notationName; } class EntityReference extends Node {} class Notation extends Node { /** * @readonly * @virtual */ public string $publicId; /** * @readonly * @virtual */ public string $systemId; } abstract class Document extends Node implements ParentNode { /** @readonly */ public Implementation $implementation; /** @virtual */ public string $URL; /** @virtual */ public string $documentURI; /** @virtual */ public string $characterSet; /** @virtual */ public string $charset; /** @virtual */ public string $inputEncoding; /** * @readonly * @virtual */ public ?DocumentType $doctype; /** * @readonly * @virtual */ public ?Element $documentElement; /** @implementation-alias Dom\Element::getElementsByTagName */ public function getElementsByTagName(string $qualifiedName): HTMLCollection {} /** @implementation-alias Dom\Element::getElementsByTagNameNS */ public function getElementsByTagNameNS(?string $namespace, string $localName): HTMLCollection {} public function createElement(string $localName): Element {} public function createElementNS(?string $namespace, string $qualifiedName): Element {} /** @implementation-alias DOMDocument::createDocumentFragment */ public function createDocumentFragment(): DocumentFragment {} /** @implementation-alias DOMDocument::createTextNode */ public function createTextNode(string $data): Text {} /** @implementation-alias DOMDocument::createCDATASection */ public function createCDATASection(string $data): CDATASection {} /** @implementation-alias DOMDocument::createComment */ public function createComment(string $data): Comment {} public function createProcessingInstruction(string $target, string $data): ProcessingInstruction {} public function importNode(?Node $node, bool $deep = false): Node {} public function adoptNode(Node $node): Node {} /** @implementation-alias DOMDocument::createAttribute */ public function createAttribute(string $localName): Attr {} /** @implementation-alias DOMDocument::createAttributeNS */ public function createAttributeNS(?string $namespace, string $qualifiedName): Attr {} /** * @readonly * @virtual */ public ?Element $firstElementChild; /** * @readonly * @virtual */ public ?Element $lastElementChild; /** * @readonly * @virtual */ public int $childElementCount; /** @implementation-alias DOMDocument::getElementById */ public function getElementById(string $elementId): ?Element {} public function registerNodeClass(string $baseClass, ?string $extendedClass): void {} #ifdef LIBXML_SCHEMAS_ENABLED /** @implementation-alias DOMDocument::schemaValidate */ public function schemaValidate(string $filename, int $flags = 0): bool {} /** @implementation-alias DOMDocument::schemaValidateSource */ public function schemaValidateSource(string $source, int $flags = 0): bool {} /** @implementation-alias DOMDocument::relaxNGValidate */ public function relaxNgValidate(string $filename): bool {} /** @implementation-alias DOMDocument::relaxNGValidateSource */ public function relaxNgValidateSource(string $source): bool {} #endif /** @implementation-alias DOMElement::append */ public function append(Node|string ...$nodes): void {} /** @implementation-alias DOMElement::prepend */ public function prepend(Node|string ...$nodes): void {} /** @implementation-alias DOMDocument::replaceChildren */ public function replaceChildren(Node|string ...$nodes): void {} public function importLegacyNode(\DOMNode $node, bool $deep = false): Node {} /** @implementation-alias Dom\Element::querySelector */ public function querySelector(string $selectors): ?Element {} /** @implementation-alias Dom\Element::querySelectorAll */ public function querySelectorAll(string $selectors): NodeList {} /** @virtual */ public ?HTMLElement $body; /** * @readonly * @virtual */ public ?HTMLElement $head; /** @virtual */ public string $title; } final class HTMLDocument extends Document { public static function createEmpty(string $encoding = "UTF-8"): HTMLDocument {} public static function createFromFile(string $path, int $options = 0, ?string $overrideEncoding = null): HTMLDocument {} public static function createFromString(string $source, int $options = 0, ?string $overrideEncoding = null): HTMLDocument {} /** @implementation-alias Dom\XMLDocument::saveXml */ public function saveXml(?Node $node = null, int $options = 0): string|false {} /** @implementation-alias DOMDocument::save */ public function saveXmlFile(string $filename, int $options = 0): int|false {} public function saveHtml(?Node $node = null): string {} public function saveHtmlFile(string $filename): int|false {} #if ZEND_DEBUG public function debugGetTemplateCount(): int {} #endif } final class XMLDocument extends Document { public static function createEmpty(string $version = "1.0", string $encoding = "UTF-8"): XMLDocument {} public static function createFromFile(string $path, int $options = 0, ?string $overrideEncoding = null): XMLDocument {} public static function createFromString(string $source, int $options = 0, ?string $overrideEncoding = null): XMLDocument {} /** * @readonly * @virtual */ public string $xmlEncoding; /** @virtual */ public bool $xmlStandalone; /** @virtual */ public string $xmlVersion; /** @virtual */ public bool $formatOutput; /** @implementation-alias DOMDocument::createEntityReference */ public function createEntityReference(string $name): EntityReference {} /** @implementation-alias DOMDocument::validate */ public function validate(): bool {} public function xinclude(int $options = 0): int {} public function saveXml(?Node $node = null, int $options = 0): string|false {} /** @implementation-alias DOMDocument::save */ public function saveXmlFile(string $filename, int $options = 0): int|false {} } /** * @not-serializable * @strict-properties */ final class TokenList implements IteratorAggregate, Countable { /** @implementation-alias Dom\Node::__construct */ private function __construct() {} /** * @readonly * @virtual */ public int $length; public function item(int $index): ?string {} public function contains(string $token): bool {} public function add(string ...$tokens): void {} public function remove(string ...$tokens): void {} public function toggle(string $token, ?bool $force = null): bool {} public function replace(string $token, string $newToken): bool {} public function supports(string $token): bool {} /** @virtual */ public string $value; public function count(): int {} public function getIterator(): \Iterator {} } /** * @not-serializable * @strict-properties */ readonly final class NamespaceInfo { public ?string $prefix; public ?string $namespaceURI; public Element $element; /** @implementation-alias Dom\Node::__construct */ private function __construct() {} } #ifdef LIBXML_XPATH_ENABLED /** @not-serializable */ final class XPath { /** * @readonly * @virtual */ public Document $document; /** @virtual */ public bool $registerNodeNamespaces; public function __construct(Document $document, bool $registerNodeNS = true) {} public function evaluate(string $expression, ?Node $contextNode = null, bool $registerNodeNS = true): null|bool|float|string|NodeList {} public function query(string $expression, ?Node $contextNode = null, bool $registerNodeNS = true): NodeList {} /** @implementation-alias DOMXPath::registerNamespace */ public function registerNamespace(string $prefix, string $namespace): bool {} /** @implementation-alias DOMXPath::registerPhpFunctions */ public function registerPhpFunctions(string|array|null $restrict = null): void {} /** @implementation-alias DOMXPath::registerPhpFunctionNS */ public function registerPhpFunctionNS(string $namespaceURI, string $name, callable $callable): void {} /** @implementation-alias DOMXPath::quote */ public static function quote(string $str): string {} } #endif function import_simplexml(object $node): Attr|Element {} }