@@ 204-223 (lines=20) @@ | ||
201 | * |
|
202 | * @return HtmlDomParser |
|
203 | */ |
|
204 | public static function __callStatic($name, $arguments) |
|
205 | { |
|
206 | $arguments0 = $arguments[0] ?? ''; |
|
207 | ||
208 | $arguments1 = $arguments[1] ?? null; |
|
209 | ||
210 | if ($name === 'str_get_html') { |
|
211 | $parser = new static(); |
|
212 | ||
213 | return $parser->loadHtml($arguments0, $arguments1); |
|
214 | } |
|
215 | ||
216 | if ($name === 'file_get_html') { |
|
217 | $parser = new static(); |
|
218 | ||
219 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
220 | } |
|
221 | ||
222 | throw new \BadMethodCallException('Method does not exist'); |
|
223 | } |
|
224 | ||
225 | public function __clone() |
|
226 | { |
@@ 24-43 (lines=20) @@ | ||
21 | * |
|
22 | * @return XmlParser |
|
23 | */ |
|
24 | public static function __callStatic($name, $arguments) |
|
25 | { |
|
26 | $arguments0 = $arguments[0] ?? ''; |
|
27 | ||
28 | $arguments1 = $arguments[1] ?? null; |
|
29 | ||
30 | if ($name === 'str_get_xml') { |
|
31 | $parser = new static(); |
|
32 | ||
33 | return $parser->loadXml($arguments0, $arguments1); |
|
34 | } |
|
35 | ||
36 | if ($name === 'file_get_xml') { |
|
37 | $parser = new static(); |
|
38 | ||
39 | return $parser->loadXmlFile($arguments0, $arguments1); |
|
40 | } |
|
41 | ||
42 | throw new \BadMethodCallException('Method does not exist'); |
|
43 | } |
|
44 | ||
45 | /** |
|
46 | * @return string |