2019-09-04 09:54:26 +00:00
|
|
|
<?php
|
|
|
|
|
2021-02-17 12:42:42 +00:00
|
|
|
/** @generate-class-entries */
|
2020-04-13 14:28:55 +00:00
|
|
|
|
2019-09-04 09:54:26 +00:00
|
|
|
class XMLReader
|
|
|
|
{
|
2022-07-26 03:57:11 +00:00
|
|
|
/* Constants for NodeType - cannot define common types to share with dom as there are differences in these types */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_NONE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int NONE = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_ELEMENT
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int ELEMENT = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_ATTRIBUTE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int ATTRIBUTE = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_TEXT
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int TEXT = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_CDATA
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int CDATA = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_ENTITY_REFERENCE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int ENTITY_REF = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_ENTITY
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int ENTITY = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_PROCESSING_INSTRUCTION
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int PI = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_COMMENT
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int COMMENT = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_DOCUMENT
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int DOC = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_DOCUMENT_TYPE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int DOC_TYPE = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_DOCUMENT_FRAGMENT
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int DOC_FRAGMENT = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_NOTATION
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int NOTATION = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_WHITESPACE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int WHITESPACE = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_SIGNIFICANT_WHITESPACE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int SIGNIFICANT_WHITESPACE = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_END_ELEMENT
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int END_ELEMENT = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_END_ENTITY
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int END_ENTITY = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_READER_TYPE_XML_DECLARATION
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int XML_DECLARATION = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
|
|
|
|
/* Constants for Parser options */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @cvalue XML_PARSER_LOADDTD
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int LOADDTD = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_PARSER_DEFAULTATTRS
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int DEFAULTATTRS = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_PARSER_VALIDATE
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int VALIDATE = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
/**
|
|
|
|
* @cvalue XML_PARSER_SUBST_ENTITIES
|
|
|
|
*/
|
2024-03-05 19:50:54 +00:00
|
|
|
public const int SUBST_ENTITIES = UNKNOWN;
|
2022-07-26 03:57:11 +00:00
|
|
|
|
|
|
|
|
2021-02-28 21:15:46 +00:00
|
|
|
public int $attributeCount;
|
|
|
|
|
|
|
|
public string $baseURI;
|
|
|
|
|
|
|
|
public int $depth;
|
|
|
|
|
|
|
|
public bool $hasAttributes;
|
|
|
|
|
|
|
|
public bool $hasValue;
|
|
|
|
|
|
|
|
public bool $isDefault;
|
|
|
|
|
|
|
|
public bool $isEmptyElement;
|
|
|
|
|
|
|
|
public string $localName;
|
|
|
|
|
|
|
|
public string $name;
|
|
|
|
|
|
|
|
public string $namespaceURI;
|
|
|
|
|
|
|
|
public int $nodeType;
|
|
|
|
|
|
|
|
public string $prefix;
|
|
|
|
|
|
|
|
public string $value;
|
|
|
|
|
|
|
|
public string $xmlLang;
|
|
|
|
|
2024-03-16 06:26:37 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function close(): true {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function getAttribute(string $name): ?string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function getAttributeNo(int $index): ?string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function getAttributeNs(string $name, string $namespace): ?string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function getParserProperty(int $property): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function isValid(): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function lookupNamespace(string $prefix): ?string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function moveToAttribute(string $name): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function moveToAttributeNo(int $index): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function moveToAttributeNs(string $name, string $namespace): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function moveToElement(): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function moveToFirstAttribute(): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function moveToNextAttribute(): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function read(): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function next(?string $name = null): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2019-10-11 07:54:00 +00:00
|
|
|
/** @return bool|XMLReader */
|
2021-05-25 17:14:48 +00:00
|
|
|
public static function open(string $uri, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2024-04-17 19:51:24 +00:00
|
|
|
/** @param resource $stream */
|
|
|
|
public static function fromStream($stream, ?string $encoding = null, int $flags = 0, ?string $documentUri = null): static {}
|
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function readInnerXml(): string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function readOuterXml(): string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function readString(): string {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function setSchema(?string $filename): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function setParserProperty(int $property, bool $value): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function setRelaxNGSchema(?string $filename): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function setRelaxNGSchemaSource(?string $source): bool {}
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2019-10-11 07:54:00 +00:00
|
|
|
/** @return bool|XMLReader */
|
2021-05-25 17:14:48 +00:00
|
|
|
public static function XML(string $source, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope
|
2019-09-04 09:54:26 +00:00
|
|
|
|
2021-05-25 17:14:48 +00:00
|
|
|
/** @tentative-return-type */
|
|
|
|
public function expand(?DOMNode $baseNode = null): DOMNode|false {}
|
2019-09-04 09:54:26 +00:00
|
|
|
}
|