@@ 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 |
@@ 151-170 (lines=20) @@ | ||
148 | * |
|
149 | * @return HtmlDomParser |
|
150 | */ |
|
151 | public static function __callStatic($name, $arguments) |
|
152 | { |
|
153 | $arguments0 = $arguments[0] ?? ''; |
|
154 | ||
155 | $arguments1 = $arguments[1] ?? null; |
|
156 | ||
157 | if ($name === 'str_get_html') { |
|
158 | $parser = new static(); |
|
159 | ||
160 | return $parser->loadHtml($arguments0, $arguments1); |
|
161 | } |
|
162 | ||
163 | if ($name === 'file_get_html') { |
|
164 | $parser = new static(); |
|
165 | ||
166 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
167 | } |
|
168 | ||
169 | throw new \BadMethodCallException('Method does not exist'); |
|
170 | } |
|
171 | ||
172 | /** @noinspection MagicMethodsValidityInspection */ |
|
173 |