php_xmlreader.stub.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. /** @generate-class-entries */
  3. class XMLReader
  4. {
  5. public int $attributeCount;
  6. public string $baseURI;
  7. public int $depth;
  8. public bool $hasAttributes;
  9. public bool $hasValue;
  10. public bool $isDefault;
  11. public bool $isEmptyElement;
  12. public string $localName;
  13. public string $name;
  14. public string $namespaceURI;
  15. public int $nodeType;
  16. public string $prefix;
  17. public string $value;
  18. public string $xmlLang;
  19. /** @return bool */
  20. public function close() {} // TODO make the return type void
  21. /** @tentative-return-type */
  22. public function getAttribute(string $name): ?string {}
  23. /** @tentative-return-type */
  24. public function getAttributeNo(int $index): ?string {}
  25. /** @tentative-return-type */
  26. public function getAttributeNs(string $name, string $namespace): ?string {}
  27. /** @tentative-return-type */
  28. public function getParserProperty(int $property): bool {}
  29. /** @tentative-return-type */
  30. public function isValid(): bool {}
  31. /** @tentative-return-type */
  32. public function lookupNamespace(string $prefix): ?string {}
  33. /** @tentative-return-type */
  34. public function moveToAttribute(string $name): bool {}
  35. /** @tentative-return-type */
  36. public function moveToAttributeNo(int $index): bool {}
  37. /** @tentative-return-type */
  38. public function moveToAttributeNs(string $name, string $namespace): bool {}
  39. /** @tentative-return-type */
  40. public function moveToElement(): bool {}
  41. /** @tentative-return-type */
  42. public function moveToFirstAttribute(): bool {}
  43. /** @tentative-return-type */
  44. public function moveToNextAttribute(): bool {}
  45. /** @tentative-return-type */
  46. public function read(): bool {}
  47. /** @tentative-return-type */
  48. public function next(?string $name = null): bool {}
  49. /** @return bool|XMLReader */
  50. public static function open(string $uri, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope
  51. /** @tentative-return-type */
  52. public function readInnerXml(): string {}
  53. /** @tentative-return-type */
  54. public function readOuterXml(): string {}
  55. /** @tentative-return-type */
  56. public function readString(): string {}
  57. /** @tentative-return-type */
  58. public function setSchema(?string $filename): bool {}
  59. /** @tentative-return-type */
  60. public function setParserProperty(int $property, bool $value): bool {}
  61. /** @tentative-return-type */
  62. public function setRelaxNGSchema(?string $filename): bool {}
  63. /** @tentative-return-type */
  64. public function setRelaxNGSchemaSource(?string $source): bool {}
  65. /** @return bool|XMLReader */
  66. public static function XML(string $source, ?string $encoding = null, int $flags = 0) {} // TODO Return type shouldn't be dependent on the call scope
  67. /** @tentative-return-type */
  68. public function expand(?DOMNode $baseNode = null): DOMNode|false {}
  69. }