xref: /PHP-8.0/ext/tidy/tidy.stub.php (revision 44ccccdf)
1<?php
2
3/** @generate-function-entries */
4
5function tidy_parse_string(string $string, array|string|null $config = null, ?string $encoding = null): tidy|false {}
6
7function tidy_get_error_buffer(tidy $tidy): string|false {}
8
9function tidy_get_output(tidy $tidy): string {}
10
11function tidy_parse_file(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false): tidy|false {}
12
13function tidy_clean_repair(tidy $tidy): bool {}
14
15function tidy_repair_string(string $string, array|string|null $config = null, ?string $encoding = null): string|false {}
16
17function tidy_repair_file(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false): string|false {}
18
19function tidy_diagnose(tidy $tidy): bool {}
20
21function tidy_get_release(): string {}
22
23#ifdef HAVE_TIDYOPTGETDOC
24function tidy_get_opt_doc(tidy $tidy, string $option): string|false {}
25#endif
26
27function tidy_get_config(tidy $tidy): array {}
28
29function tidy_get_status(tidy $tidy): int {}
30
31function tidy_get_html_ver(tidy $tidy): int {}
32
33function tidy_is_xhtml(tidy $tidy): bool {}
34
35function tidy_is_xml(tidy $tidy): bool {}
36
37function tidy_error_count(tidy $tidy): int {}
38
39function tidy_warning_count(tidy $tidy): int {}
40
41function tidy_access_count(tidy $tidy): int {}
42
43function tidy_config_count(tidy $tidy): int {}
44
45function tidy_getopt(tidy $tidy, string $option): string|int|bool {}
46
47function tidy_get_root(tidy $tidy): ?tidyNode {}
48
49function tidy_get_html(tidy $tidy): ?tidyNode {}
50
51function tidy_get_head(tidy $tidy): ?tidyNode {}
52
53function tidy_get_body(tidy $tidy): ?tidyNode {}
54
55class tidy
56{
57    public function __construct(?string $filename = null, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false) {}
58
59    /**
60     * @return string|int|bool
61     * @alias tidy_getopt
62     */
63    public function getOpt(string $option) {}
64
65    /**
66     * @return bool
67     * @alias tidy_clean_repair
68     */
69    public function cleanRepair() {}
70
71    /** @return bool */
72    public function parseFile(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false) {}
73
74    /** @return bool */
75    public function parseString(string $string, array|string|null $config = null, ?string $encoding = null) {}
76
77    /**
78     * @return string|false
79     * @alias tidy_repair_string
80     */
81    public static function repairString(string $string, array|string|null $config = null, ?string $encoding = null) {}
82
83    /**
84     * @return string|false
85     * @alias tidy_repair_file
86     */
87    public static function repairFile(string $filename, array|string|null $config = null, ?string $encoding = null, bool $useIncludePath = false) {}
88
89    /**
90     * @return bool
91     * @alias tidy_diagnose
92     */
93    public function diagnose() {}
94
95    /**
96     * @return string
97     * @alias tidy_get_release
98     */
99    public function getRelease() {}
100
101    /**
102     * @return array
103     * @alias tidy_get_config
104     */
105    public function getConfig() {}
106
107    /**
108     * @return int
109     * @alias tidy_get_status
110     */
111    public function getStatus() {}
112
113    /**
114     * @return int
115     * @alias tidy_get_html_ver
116     */
117    public function getHtmlVer() {}
118
119#ifdef HAVE_TIDYOPTGETDOC
120    /**
121     * @return string|false
122     * @alias tidy_get_opt_doc
123     */
124    public function getOptDoc(string $option) {}
125#endif
126
127    /**
128     * @return bool
129     * @alias tidy_is_xhtml
130     */
131    public function isXhtml() {}
132
133    /**
134     * @return bool
135     * @alias tidy_is_xml
136     */
137    public function isXml() {}
138
139    /**
140     * @return tidyNode|null
141     * @alias tidy_get_root
142     */
143    public function root() {}
144
145    /**
146     * @return tidyNode|null
147     * @alias tidy_get_head
148     */
149    public function head() {}
150
151    /**
152     * @return tidyNode|null
153     * @alias tidy_get_html
154     */
155    public function html() {}
156
157    /**
158     * @return tidyNode|null
159     * @alias tidy_get_body
160     */
161    public function body() {}
162}
163
164final class tidyNode
165{
166    private function __construct() {}
167
168    public function hasChildren(): bool {}
169
170    public function hasSiblings(): bool {}
171
172    public function isComment(): bool {}
173
174    public function isHtml(): bool {}
175
176    public function isText(): bool {}
177
178    public function isJste(): bool {}
179
180    public function isAsp(): bool {}
181
182    public function isPhp(): bool {}
183
184    public function getParent(): ?tidyNode {}
185}
186