xref: /PHP-8.1/ext/xml/xml.stub.php (revision b1d9a8d3)
1<?php
2
3/** @generate-class-entries */
4
5function xml_parser_create(?string $encoding = null): XMLParser {}
6
7function xml_parser_create_ns(?string $encoding = null, string $separator = ":"): XMLParser {}
8
9function xml_set_object(XMLParser $parser, object $object): bool {}
10
11/**
12 * @param callable $start_handler
13 * @param callable $end_handler
14 */
15function xml_set_element_handler(XMLParser $parser, $start_handler, $end_handler): bool {}
16
17/** @param callable $handler */
18function xml_set_character_data_handler(XMLParser $parser, $handler): bool {}
19
20/** @param callable $handler */
21function xml_set_processing_instruction_handler(XMLParser $parser, $handler): bool {}
22
23/** @param callable $handler */
24function xml_set_default_handler(XMLParser $parser, $handler): bool {}
25
26/** @param callable $handler */
27function xml_set_unparsed_entity_decl_handler(XMLParser $parser, $handler): bool {}
28
29/** @param callable $handler */
30function xml_set_notation_decl_handler(XMLParser $parser, $handler): bool {}
31
32/** @param callable $handler */
33function xml_set_external_entity_ref_handler(XMLParser $parser, $handler): bool {}
34
35/** @param callable $handler */
36function xml_set_start_namespace_decl_handler(XMLParser $parser, $handler): bool {}
37
38/** @param callable $handler */
39function xml_set_end_namespace_decl_handler(XMLParser $parser, $handler): bool {}
40
41function xml_parse(XMLParser $parser, string $data, bool $is_final = false): int {}
42
43/**
44 * @param array $values
45 * @param array $index
46 */
47function xml_parse_into_struct(XMLParser $parser, string $data, &$values, &$index = null): int|false {}
48
49function xml_get_error_code(XMLParser $parser): int {}
50
51/** @refcount 1 */
52function xml_error_string(int $error_code): ?string {}
53
54function xml_get_current_line_number(XMLParser $parser): int {}
55
56function xml_get_current_column_number(XMLParser $parser): int {}
57
58function xml_get_current_byte_index(XMLParser $parser): int {}
59
60function xml_parser_free(XMLParser $parser): bool {}
61
62/** @param string|int $value */
63function xml_parser_set_option(XMLParser $parser, int $option, $value): bool {}
64
65/** @refcount 1 */
66function xml_parser_get_option(XMLParser $parser, int $option): string|int {}
67
68/**
69 * @strict-properties
70 * @not-serializable
71 */
72final class XMLParser
73{
74}
75