| @@ 59-78 (lines=20) @@ | ||
| 56 | * |
|
| 57 | * @return XmlDomParser |
|
| 58 | */ |
|
| 59 | public static function __callStatic($name, $arguments) |
|
| 60 | { |
|
| 61 | $arguments0 = $arguments[0] ?? ''; |
|
| 62 | ||
| 63 | $arguments1 = $arguments[1] ?? null; |
|
| 64 | ||
| 65 | if ($name === 'str_get_xml') { |
|
| 66 | $parser = new static(); |
|
| 67 | ||
| 68 | return $parser->loadXml($arguments0, $arguments1); |
|
| 69 | } |
|
| 70 | ||
| 71 | if ($name === 'file_get_xml') { |
|
| 72 | $parser = new static(); |
|
| 73 | ||
| 74 | return $parser->loadXmlFile($arguments0, $arguments1); |
|
| 75 | } |
|
| 76 | ||
| 77 | throw new \BadMethodCallException('Method does not exist'); |
|
| 78 | } |
|
| 79 | ||
| 80 | /** @noinspection MagicMethodsValidityInspection */ |
|
| 81 | ||
| @@ 146-165 (lines=20) @@ | ||
| 143 | * |
|
| 144 | * @return HtmlDomParser |
|
| 145 | */ |
|
| 146 | public static function __callStatic($name, $arguments) |
|
| 147 | { |
|
| 148 | $arguments0 = $arguments[0] ?? ''; |
|
| 149 | ||
| 150 | $arguments1 = $arguments[1] ?? null; |
|
| 151 | ||
| 152 | if ($name === 'str_get_html') { |
|
| 153 | $parser = new static(); |
|
| 154 | ||
| 155 | return $parser->loadHtml($arguments0, $arguments1); |
|
| 156 | } |
|
| 157 | ||
| 158 | if ($name === 'file_get_html') { |
|
| 159 | $parser = new static(); |
|
| 160 | ||
| 161 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
| 162 | } |
|
| 163 | ||
| 164 | throw new \BadMethodCallException('Method does not exist'); |
|
| 165 | } |
|
| 166 | ||
| 167 | /** @noinspection MagicMethodsValidityInspection */ |
|
| 168 | ||