1<?php 2 3// AUTOMATICALLY GENERATED. DO NOT EDIT. 4// Use `composer build` to regenerate. 5 6namespace Wikimedia\IDLeDOM; 7 8/** 9 * Node 10 * 11 * @see https://dom.spec.whatwg.org/#interface-node 12 * 13 * @property int $nodeType 14 * @property string $nodeName 15 * @property string $baseURI 16 * @property bool $isConnected 17 * @property Document|null $ownerDocument 18 * @property Node|null $parentNode 19 * @property Element|null $parentElement 20 * @property NodeList $childNodes 21 * @property Node|null $firstChild 22 * @property Node|null $lastChild 23 * @property Node|null $previousSibling 24 * @property Node|null $nextSibling 25 * @property ?string $nodeValue 26 * @property ?string $textContent 27 * @phan-forbid-undeclared-magic-properties 28 */ 29interface Node extends EventTarget { 30 // Direct parent: EventTarget 31 32 /** @var int */ 33 public const ELEMENT_NODE = 1; 34 35 /** @var int */ 36 public const ATTRIBUTE_NODE = 2; 37 38 /** @var int */ 39 public const TEXT_NODE = 3; 40 41 /** @var int */ 42 public const CDATA_SECTION_NODE = 4; 43 44 /** @var int */ 45 public const ENTITY_REFERENCE_NODE = 5; 46 47 /** @var int */ 48 public const ENTITY_NODE = 6; 49 50 /** @var int */ 51 public const PROCESSING_INSTRUCTION_NODE = 7; 52 53 /** @var int */ 54 public const COMMENT_NODE = 8; 55 56 /** @var int */ 57 public const DOCUMENT_NODE = 9; 58 59 /** @var int */ 60 public const DOCUMENT_TYPE_NODE = 10; 61 62 /** @var int */ 63 public const DOCUMENT_FRAGMENT_NODE = 11; 64 65 /** @var int */ 66 public const NOTATION_NODE = 12; 67 68 /** 69 * @return int 70 */ 71 public function getNodeType(): int; 72 73 /** 74 * @return string 75 */ 76 public function getNodeName(): string; 77 78 /** 79 * @return string 80 */ 81 public function getBaseURI(): string; 82 83 /** 84 * @return bool 85 */ 86 public function getIsConnected(): bool; 87 88 /** 89 * @return Document|null 90 */ 91 public function getOwnerDocument(); 92 93 /** 94 * @param GetRootNodeOptions|associative-array|null $options 95 * @return \Wikimedia\IDLeDOM\Node 96 */ 97 public function getRootNode( /* ?mixed */ $options = null ); 98 99 /** 100 * @return Node|null 101 */ 102 public function getParentNode(); 103 104 /** 105 * @return Element|null 106 */ 107 public function getParentElement(); 108 109 /** 110 * @return bool 111 */ 112 public function hasChildNodes(): bool; 113 114 /** 115 * @return NodeList 116 */ 117 public function getChildNodes(); 118 119 /** 120 * @return Node|null 121 */ 122 public function getFirstChild(); 123 124 /** 125 * @return Node|null 126 */ 127 public function getLastChild(); 128 129 /** 130 * @return Node|null 131 */ 132 public function getPreviousSibling(); 133 134 /** 135 * @return Node|null 136 */ 137 public function getNextSibling(); 138 139 /** 140 * @return ?string 141 */ 142 public function getNodeValue(): ?string; 143 144 /** 145 * @param ?string $val 146 */ 147 public function setNodeValue( ?string $val ): void; 148 149 /** 150 * @return ?string 151 */ 152 public function getTextContent(): ?string; 153 154 /** 155 * @param ?string $val 156 */ 157 public function setTextContent( ?string $val ): void; 158 159 /** 160 * @return void 161 */ 162 public function normalize(): void; 163 164 /** 165 * @param bool $deep 166 * @return \Wikimedia\IDLeDOM\Node 167 */ 168 public function cloneNode( bool $deep = false ); 169 170 /** 171 * @param \Wikimedia\IDLeDOM\Node|null $otherNode 172 * @return bool 173 */ 174 public function isEqualNode( /* ?\Wikimedia\IDLeDOM\Node */ $otherNode ): bool; 175 176 /** 177 * @param \Wikimedia\IDLeDOM\Node|null $otherNode 178 * @return bool 179 */ 180 public function isSameNode( /* ?\Wikimedia\IDLeDOM\Node */ $otherNode ): bool; 181 182 /** @var int */ 183 public const DOCUMENT_POSITION_DISCONNECTED = 0x01; 184 185 /** @var int */ 186 public const DOCUMENT_POSITION_PRECEDING = 0x02; 187 188 /** @var int */ 189 public const DOCUMENT_POSITION_FOLLOWING = 0x04; 190 191 /** @var int */ 192 public const DOCUMENT_POSITION_CONTAINS = 0x08; 193 194 /** @var int */ 195 public const DOCUMENT_POSITION_CONTAINED_BY = 0x10; 196 197 /** @var int */ 198 public const DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; 199 200 /** 201 * @param \Wikimedia\IDLeDOM\Node $other 202 * @return int 203 */ 204 public function compareDocumentPosition( /* \Wikimedia\IDLeDOM\Node */ $other ): int; 205 206 /** 207 * @param \Wikimedia\IDLeDOM\Node|null $other 208 * @return bool 209 */ 210 public function contains( /* ?\Wikimedia\IDLeDOM\Node */ $other ): bool; 211 212 /** 213 * @param ?string $namespace 214 * @return ?string 215 */ 216 public function lookupPrefix( ?string $namespace ): ?string; 217 218 /** 219 * @param ?string $prefix 220 * @return ?string 221 */ 222 public function lookupNamespaceURI( ?string $prefix ): ?string; 223 224 /** 225 * @param ?string $namespace 226 * @return bool 227 */ 228 public function isDefaultNamespace( ?string $namespace ): bool; 229 230 /** 231 * @param \Wikimedia\IDLeDOM\Node $node 232 * @param \Wikimedia\IDLeDOM\Node|null $child 233 * @return \Wikimedia\IDLeDOM\Node 234 */ 235 public function insertBefore( /* \Wikimedia\IDLeDOM\Node */ $node, /* ?\Wikimedia\IDLeDOM\Node */ $child = null ); 236 237 /** 238 * @param \Wikimedia\IDLeDOM\Node $node 239 * @return \Wikimedia\IDLeDOM\Node 240 */ 241 public function appendChild( /* \Wikimedia\IDLeDOM\Node */ $node ); 242 243 /** 244 * @param \Wikimedia\IDLeDOM\Node $node 245 * @param \Wikimedia\IDLeDOM\Node $child 246 * @return \Wikimedia\IDLeDOM\Node 247 */ 248 public function replaceChild( /* \Wikimedia\IDLeDOM\Node */ $node, /* \Wikimedia\IDLeDOM\Node */ $child ); 249 250 /** 251 * @param \Wikimedia\IDLeDOM\Node $child 252 * @return \Wikimedia\IDLeDOM\Node 253 */ 254 public function removeChild( /* \Wikimedia\IDLeDOM\Node */ $child ); 255 256} 257