@@ 180-199 (lines=20) @@ | ||
177 | * |
|
178 | * @return HtmlDomParser |
|
179 | */ |
|
180 | public static function __callStatic($name, $arguments) |
|
181 | { |
|
182 | $arguments0 = $arguments[0] ?? ''; |
|
183 | ||
184 | $arguments1 = $arguments[1] ?? null; |
|
185 | ||
186 | if ($name === 'str_get_html') { |
|
187 | $parser = new static(); |
|
188 | ||
189 | return $parser->loadHtml($arguments0, $arguments1); |
|
190 | } |
|
191 | ||
192 | if ($name === 'file_get_html') { |
|
193 | $parser = new static(); |
|
194 | ||
195 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
196 | } |
|
197 | ||
198 | throw new \BadMethodCallException('Method does not exist'); |
|
199 | } |
|
200 | ||
201 | /** @noinspection MagicMethodsValidityInspection */ |
|
202 |
@@ 58-77 (lines=20) @@ | ||
55 | * |
|
56 | * @return XmlDomParser |
|
57 | */ |
|
58 | public static function __callStatic($name, $arguments) |
|
59 | { |
|
60 | $arguments0 = $arguments[0] ?? ''; |
|
61 | ||
62 | $arguments1 = $arguments[1] ?? null; |
|
63 | ||
64 | if ($name === 'str_get_xml') { |
|
65 | $parser = new static(); |
|
66 | ||
67 | return $parser->loadXml($arguments0, $arguments1); |
|
68 | } |
|
69 | ||
70 | if ($name === 'file_get_xml') { |
|
71 | $parser = new static(); |
|
72 | ||
73 | return $parser->loadXmlFile($arguments0, $arguments1); |
|
74 | } |
|
75 | ||
76 | throw new \BadMethodCallException('Method does not exist'); |
|
77 | } |
|
78 | ||
79 | /** @noinspection MagicMethodsValidityInspection */ |
|
80 |