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