| @@ 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 | ||
| @@ 202-221 (lines=20) @@ | ||
| 199 | * |
|
| 200 | * @return HtmlDomParser |
|
| 201 | */ |
|
| 202 | public static function __callStatic($name, $arguments) |
|
| 203 | { |
|
| 204 | $arguments0 = $arguments[0] ?? ''; |
|
| 205 | ||
| 206 | $arguments1 = $arguments[1] ?? null; |
|
| 207 | ||
| 208 | if ($name === 'str_get_html') { |
|
| 209 | $parser = new static(); |
|
| 210 | ||
| 211 | return $parser->loadHtml($arguments0, $arguments1); |
|
| 212 | } |
|
| 213 | ||
| 214 | if ($name === 'file_get_html') { |
|
| 215 | $parser = new static(); |
|
| 216 | ||
| 217 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
| 218 | } |
|
| 219 | ||
| 220 | throw new \BadMethodCallException('Method does not exist'); |
|
| 221 | } |
|
| 222 | ||
| 223 | /** @noinspection MagicMethodsValidityInspection */ |
|
| 224 | ||