xref: /PHP-8.0/ext/simplexml/simplexml.stub.php (revision 24d9527c)
1<?php
2
3/** @generate-function-entries */
4
5function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
6
7function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
8
9function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}
10
11class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
12{
13    /** @return array|null|false */
14    public function xpath(string $expression) {}
15
16    /** @return bool */
17    public function registerXPathNamespace(string $prefix, string $namespace) {}
18
19    /** @return string|bool */
20    public function asXML(?string $filename = null) {}
21
22    /**
23     * @return string|bool
24     * @alias SimpleXMLElement::asXML
25     */
26    public function saveXML(?string $filename = null) {}
27
28    /** @return array */
29    public function getNamespaces(bool $recursive = false) {}
30
31    /** @return array|false */
32    public function getDocNamespaces(bool $recursive = false, bool $fromRoot = true) {}
33
34    /** @return SimpleXMLElement|null */
35    public function children(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}
36
37    /** @return SimpleXMLElement|null */
38    public function attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}
39
40    public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = "", bool $isPrefix = false) {}
41
42    /** @return SimpleXMLElement|null */
43    public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
44
45    /** @return void */
46    public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null) {}
47
48    /** @return string */
49    public function getName() {}
50
51    public function __toString(): string {}
52
53    /** @return int */
54    public function count() {}
55
56    /** @return void */
57    public function rewind() {}
58
59    /** @return bool */
60    public function valid() {}
61
62    /** @return SimpleXMLElement|null */
63    public function current() {}
64
65    /** @return string|false */
66    public function key() {}
67
68    /** @return void */
69    public function next() {}
70
71    /** @return bool */
72    public function hasChildren() {}
73
74    /** @return SimpleXMLElement|null */
75    public function getChildren() {}
76}
77
78class SimpleXMLIterator extends SimpleXMLElement
79{
80}
81