simplexml.stub.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /** @generate-class-entries */
  3. function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
  4. function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
  5. function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}
  6. /** @not-serializable */
  7. class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
  8. {
  9. /** @tentative-return-type */
  10. public function xpath(string $expression): array|null|false {}
  11. /** @tentative-return-type */
  12. public function registerXPathNamespace(string $prefix, string $namespace): bool {}
  13. /** @tentative-return-type */
  14. public function asXML(?string $filename = null): string|bool {}
  15. /**
  16. * @tentative-return-type
  17. * @alias SimpleXMLElement::asXML
  18. */
  19. public function saveXML(?string $filename = null): string|bool {}
  20. /** @tentative-return-type */
  21. public function getNamespaces(bool $recursive = false): array {}
  22. /** @tentative-return-type */
  23. public function getDocNamespaces(bool $recursive = false, bool $fromRoot = true): array|false {}
  24. /** @tentative-return-type */
  25. public function children(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement {}
  26. /** @tentative-return-type */
  27. public function attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement {}
  28. public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = "", bool $isPrefix = false) {}
  29. /** @tentative-return-type */
  30. public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null): ?SimpleXMLElement {}
  31. /** @tentative-return-type */
  32. public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null): void {}
  33. /** @tentative-return-type */
  34. public function getName(): string {}
  35. public function __toString(): string {}
  36. /** @tentative-return-type */
  37. public function count(): int {}
  38. /** @tentative-return-type */
  39. public function rewind(): void {}
  40. /** @tentative-return-type */
  41. public function valid(): bool {}
  42. /** @tentative-return-type */
  43. public function current(): SimpleXMLElement {}
  44. /** @tentative-return-type */
  45. public function key(): string {}
  46. /** @tentative-return-type */
  47. public function next(): void {}
  48. /** @tentative-return-type */
  49. public function hasChildren(): bool {}
  50. /** @tentative-return-type */
  51. public function getChildren(): ?SimpleXMLElement {}
  52. }
  53. class SimpleXMLIterator extends SimpleXMLElement
  54. {
  55. }