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 public int $attributeCount; 103 104 public string $baseURI; 105 106 public int $depth; 107 108 public bool $hasAttributes; 109 110 public bool $hasValue; 111 112 public bool $isDefault; 113 114 public bool $isEmptyElement; 115 116 public string $localName; 117 118 public string $name; 119 120 public string $namespaceURI; 121 122 public int $nodeType; 123 124 public string $prefix; 125 126 public string $value; 127 128 public string $xmlLang; 129 130 /** @tentative-return-type */ 131 public function close(): true {} 132 133 /** @tentative-return-type */ 134 public function getAttribute(string $name): ?string {} 135 136 /** @tentative-return-type */ 137 public function getAttributeNo(int $index): ?string {} 138 139 /** @tentative-return-type */ 140 public function getAttributeNs(string $name, string $namespace): ?string {} 141 142 /** @tentative-return-type */ 143 public function getParserProperty(int $property): bool {} 144 145 /** @tentative-return-type */ 146 public function isValid(): bool {} 147 148 /** @tentative-return-type */ 149 public function lookupNamespace(string $prefix): ?string {} 150 151 /** @tentative-return-type */ 152 public function moveToAttribute(string $name): bool {} 153 154 /** @tentative-return-type */ 155 public function moveToAttributeNo(int $index): bool {} 156 157 /** @tentative-return-type */ 158 public function moveToAttributeNs(string $name, string $namespace): bool {} 159 160 /** @tentative-return-type */ 161 public function moveToElement(): bool {} 162 163 /** @tentative-return-type */ 164 public function moveToFirstAttribute(): bool {} 165 166 /** @tentative-return-type */ 167 public function moveToNextAttribute(): bool {} 168 169 /** @tentative-return-type */ 170 public function read(): bool {} 171 172 /** @tentative-return-type */ 173 public function next(?string $name = null): bool {} 174 175 /** @return bool|XMLReader */ 176 public static function open(string $uri, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope 177 178 /** @tentative-return-type */ 179 public function readInnerXml(): string {} 180 181 /** @tentative-return-type */ 182 public function readOuterXml(): string {} 183 184 /** @tentative-return-type */ 185 public function readString(): string {} 186 187 /** @tentative-return-type */ 188 public function setSchema(?string $filename): bool {} 189 190 /** @tentative-return-type */ 191 public function setParserProperty(int $property, bool $value): bool {} 192 193 /** @tentative-return-type */ 194 public function setRelaxNGSchema(?string $filename): bool {} 195 196 /** @tentative-return-type */ 197 public function setRelaxNGSchemaSource(?string $source): bool {} 198 199 /** @return bool|XMLReader */ 200 public static function XML(string $source, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope 201 202 /** @tentative-return-type */ 203 public function expand(?DOMNode $baseNode = null): DOMNode|false {} 204} 205