| @@ 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 | ||
| @@ 94-113 (lines=20) @@ | ||
| 91 | * |
|
| 92 | * @return XmlDomParser |
|
| 93 | */ |
|
| 94 | public static function __callStatic($name, $arguments) |
|
| 95 | { |
|
| 96 | $arguments0 = $arguments[0] ?? ''; |
|
| 97 | ||
| 98 | $arguments1 = $arguments[1] ?? null; |
|
| 99 | ||
| 100 | if ($name === 'str_get_xml') { |
|
| 101 | $parser = new static(); |
|
| 102 | ||
| 103 | return $parser->loadXml($arguments0, $arguments1); |
|
| 104 | } |
|
| 105 | ||
| 106 | if ($name === 'file_get_xml') { |
|
| 107 | $parser = new static(); |
|
| 108 | ||
| 109 | return $parser->loadXmlFile($arguments0, $arguments1); |
|
| 110 | } |
|
| 111 | ||
| 112 | throw new \BadMethodCallException('Method does not exist'); |
|
| 113 | } |
|
| 114 | ||
| 115 | /** @noinspection MagicMethodsValidityInspection */ |
|
| 116 | ||