1<?php 2 3/** @generate-class-entries */ 4 5class XMLReader 6{ 7 /* Constants for NodeType - cannot define common types to share with dom as there are differences in these types */ 8 9 /** 10 * @cvalue XML_READER_TYPE_NONE 11 */ 12 public const int NONE = UNKNOWN; 13 /** 14 * @cvalue XML_READER_TYPE_ELEMENT 15 */ 16 public const int ELEMENT = UNKNOWN; 17 /** 18 * @cvalue XML_READER_TYPE_ATTRIBUTE 19 */ 20 public const int ATTRIBUTE = UNKNOWN; 21 /** 22 * @cvalue XML_READER_TYPE_TEXT 23 */ 24 public const int TEXT = UNKNOWN; 25 /** 26 * @cvalue XML_READER_TYPE_CDATA 27 */ 28 public const int CDATA = UNKNOWN; 29 /** 30 * @cvalue XML_READER_TYPE_ENTITY_REFERENCE 31 */ 32 public const int ENTITY_REF = UNKNOWN; 33 /** 34 * @cvalue XML_READER_TYPE_ENTITY 35 */ 36 public const int ENTITY = UNKNOWN; 37 /** 38 * @cvalue XML_READER_TYPE_PROCESSING_INSTRUCTION 39 */ 40 public const int PI = UNKNOWN; 41 /** 42 * @cvalue XML_READER_TYPE_COMMENT 43 */ 44 public const int COMMENT = UNKNOWN; 45 /** 46 * @cvalue XML_READER_TYPE_DOCUMENT 47 */ 48 public const int DOC = UNKNOWN; 49 /** 50 * @cvalue XML_READER_TYPE_DOCUMENT_TYPE 51 */ 52 public const int DOC_TYPE = UNKNOWN; 53 /** 54 * @cvalue XML_READER_TYPE_DOCUMENT_FRAGMENT 55 */ 56 public const int DOC_FRAGMENT = UNKNOWN; 57 /** 58 * @cvalue XML_READER_TYPE_NOTATION 59 */ 60 public const int NOTATION = UNKNOWN; 61 /** 62 * @cvalue XML_READER_TYPE_WHITESPACE 63 */ 64 public const int WHITESPACE = UNKNOWN; 65 /** 66 * @cvalue XML_READER_TYPE_SIGNIFICANT_WHITESPACE 67 */ 68 public const int SIGNIFICANT_WHITESPACE = UNKNOWN; 69 /** 70 * @cvalue XML_READER_TYPE_END_ELEMENT 71 */ 72 public const int END_ELEMENT = UNKNOWN; 73 /** 74 * @cvalue XML_READER_TYPE_END_ENTITY 75 */ 76 public const int END_ENTITY = UNKNOWN; 77 /** 78 * @cvalue XML_READER_TYPE_XML_DECLARATION 79 */ 80 public const int XML_DECLARATION = UNKNOWN; 81 82 /* Constants for Parser options */ 83 84 /** 85 * @cvalue XML_PARSER_LOADDTD 86 */ 87 public const int LOADDTD = UNKNOWN; 88 /** 89 * @cvalue XML_PARSER_DEFAULTATTRS 90 */ 91 public const int DEFAULTATTRS = UNKNOWN; 92 /** 93 * @cvalue XML_PARSER_VALIDATE 94 */ 95 public const int VALIDATE = UNKNOWN; 96 /** 97 * @cvalue XML_PARSER_SUBST_ENTITIES 98 */ 99 public const int SUBST_ENTITIES = UNKNOWN; 100 101 102 /** @virtual */ 103 public int $attributeCount; 104 105 /** @virtual */ 106 public string $baseURI; 107 108 /** @virtual */ 109 public int $depth; 110 111 /** @virtual */ 112 public bool $hasAttributes; 113 114 /** @virtual */ 115 public bool $hasValue; 116 117 /** @virtual */ 118 public bool $isDefault; 119 120 /** @virtual */ 121 public bool $isEmptyElement; 122 123 /** @virtual */ 124 public string $localName; 125 126 /** @virtual */ 127 public string $name; 128 129 /** @virtual */ 130 public string $namespaceURI; 131 132 /** @virtual */ 133 public int $nodeType; 134 135 /** @virtual */ 136 public string $prefix; 137 138 /** @virtual */ 139 public string $value; 140 141 /** @virtual */ 142 public string $xmlLang; 143 144 /** @tentative-return-type */ 145 public function close(): true {} 146 147 /** @tentative-return-type */ 148 public function getAttribute(string $name): ?string {} 149 150 /** @tentative-return-type */ 151 public function getAttributeNo(int $index): ?string {} 152 153 /** @tentative-return-type */ 154 public function getAttributeNs(string $name, string $namespace): ?string {} 155 156 /** @tentative-return-type */ 157 public function getParserProperty(int $property): bool {} 158 159 /** @tentative-return-type */ 160 public function isValid(): bool {} 161 162 /** @tentative-return-type */ 163 public function lookupNamespace(string $prefix): ?string {} 164 165 /** @tentative-return-type */ 166 public function moveToAttribute(string $name): bool {} 167 168 /** @tentative-return-type */ 169 public function moveToAttributeNo(int $index): bool {} 170 171 /** @tentative-return-type */ 172 public function moveToAttributeNs(string $name, string $namespace): bool {} 173 174 /** @tentative-return-type */ 175 public function moveToElement(): bool {} 176 177 /** @tentative-return-type */ 178 public function moveToFirstAttribute(): bool {} 179 180 /** @tentative-return-type */ 181 public function moveToNextAttribute(): bool {} 182 183 /** @tentative-return-type */ 184 public function read(): bool {} 185 186 /** @tentative-return-type */ 187 public function next(?string $name = null): bool {} 188 189 /** @return bool|XMLReader */ 190 public static function open(string $uri, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope 191 192 public static function fromUri(string $uri, ?string $encoding = null, int $flags = 0): static {} 193 194 /** @param resource $stream */ 195 public static function fromStream($stream, ?string $encoding = null, int $flags = 0, ?string $documentUri = null): static {} 196 197 /** @tentative-return-type */ 198 public function readInnerXml(): string {} 199 200 /** @tentative-return-type */ 201 public function readOuterXml(): string {} 202 203 /** @tentative-return-type */ 204 public function readString(): string {} 205 206 /** @tentative-return-type */ 207 public function setSchema(?string $filename): bool {} 208 209 /** @tentative-return-type */ 210 public function setParserProperty(int $property, bool $value): bool {} 211 212 /** @tentative-return-type */ 213 public function setRelaxNGSchema(?string $filename): bool {} 214 215 /** @tentative-return-type */ 216 public function setRelaxNGSchemaSource(?string $source): bool {} 217 218 /** @return bool|XMLReader */ 219 public static function XML(string $source, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope 220 221 public static function fromString(string $source, ?string $encoding = null, int $flags = 0): static {} 222 223 /** @tentative-return-type */ 224 public function expand(?DOMNode $baseNode = null): DOMNode|false {} 225} 226