@@ 216-235 (lines=20) @@ | ||
213 | * |
|
214 | * @return HtmlDomParser |
|
215 | */ |
|
216 | public static function __callStatic($name, $arguments) |
|
217 | { |
|
218 | $arguments0 = $arguments[0] ?? ''; |
|
219 | ||
220 | $arguments1 = $arguments[1] ?? null; |
|
221 | ||
222 | if ($name === 'str_get_html') { |
|
223 | $parser = new static(); |
|
224 | ||
225 | return $parser->loadHtml($arguments0, $arguments1); |
|
226 | } |
|
227 | ||
228 | if ($name === 'file_get_html') { |
|
229 | $parser = new static(); |
|
230 | ||
231 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
232 | } |
|
233 | ||
234 | throw new \BadMethodCallException('Method does not exist'); |
|
235 | } |
|
236 | ||
237 | /** @noinspection MagicMethodsValidityInspection */ |
|
238 |
@@ 82-101 (lines=20) @@ | ||
79 | * |
|
80 | * @return XmlDomParser |
|
81 | */ |
|
82 | public static function __callStatic($name, $arguments) |
|
83 | { |
|
84 | $arguments0 = $arguments[0] ?? ''; |
|
85 | ||
86 | $arguments1 = $arguments[1] ?? null; |
|
87 | ||
88 | if ($name === 'str_get_xml') { |
|
89 | $parser = new static(); |
|
90 | ||
91 | return $parser->loadXml($arguments0, $arguments1); |
|
92 | } |
|
93 | ||
94 | if ($name === 'file_get_xml') { |
|
95 | $parser = new static(); |
|
96 | ||
97 | return $parser->loadXmlFile($arguments0, $arguments1); |
|
98 | } |
|
99 | ||
100 | throw new \BadMethodCallException('Method does not exist'); |
|
101 | } |
|
102 | ||
103 | /** @noinspection MagicMethodsValidityInspection */ |
|
104 |