summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.stub.php
blob: ec4f1a61df7eb807b69d37f37f62edb8687d098f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php

/** @generate-class-entries */

function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}

function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}

function simplexml_import_dom(DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}

class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
{
    /** @return array|false */
    public function xpath(string $expression) {}

    /** @return bool */
    public function registerXPathNamespace(string $prefix, string $namespace) {}

    /** @return string|bool */
    public function asXML(?string $filename = null) {}

    /**
     * @return string|bool
     * @alias SimpleXMLElement::asXML
     */
    public function saveXML(?string $filename = null) {}

    /** @return array */
    public function getNamespaces(bool $recursive = false) {}

    /** @return array|false */
    public function getDocNamespaces(bool $recursive = false, bool $fromRoot = true) {}

    /** @return SimpleXMLIterator */
    public function children(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}

    /** @return SimpleXMLIterator */
    public function attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}

    public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = "", bool $isPrefix = false) {}

    /** @return SimpleXMLElement */
    public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}

    /** @return SimpleXMLElement */
    public function addAttribute(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}

    /** @return string */
    public function getName() {}

    public function __toString(): string {}

    /** @return int */
    public function count() {}

    /** @return void */
    public function rewind() {}

    /** @return bool */
    public function valid() {}

    /** @return SimpleXMLElement|null */
    public function current() {}

    /** @return string|false */
    public function key() {}

    /** @return void */
    public function next() {}

    /** @return bool */
    public function hasChildren() {}

    /** @return SimpleXMLElement|null */
    public function getChildren() {}
}

class SimpleXMLIterator extends SimpleXMLElement
{
}