@@ 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 |
@@ 161-180 (lines=20) @@ | ||
158 | * |
|
159 | * @return HtmlDomParser |
|
160 | */ |
|
161 | public static function __callStatic($name, $arguments) |
|
162 | { |
|
163 | $arguments0 = $arguments[0] ?? ''; |
|
164 | ||
165 | $arguments1 = $arguments[1] ?? null; |
|
166 | ||
167 | if ($name === 'str_get_html') { |
|
168 | $parser = new static(); |
|
169 | ||
170 | return $parser->loadHtml($arguments0, $arguments1); |
|
171 | } |
|
172 | ||
173 | if ($name === 'file_get_html') { |
|
174 | $parser = new static(); |
|
175 | ||
176 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
177 | } |
|
178 | ||
179 | throw new \BadMethodCallException('Method does not exist'); |
|
180 | } |
|
181 | ||
182 | /** @noinspection MagicMethodsValidityInspection */ |
|
183 |