summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.stub.php
blob: 3a1d0d51f4e3e4c56f0e7b097ead6719fd6fedd3 (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
<?php

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

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

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

class SimpleXMLElement
{
    /** @return array|false */
    public function xpath(string $path) {}

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

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

    /** @return string|bool */
    public function saveXML(string $filename = UNKNOWN) {}

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

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

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

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

    public function __construct(string $data, int $options = 0, bool $data_is_url = false, string $ns = '', bool $is_prefix = false) {}

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

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

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

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

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