@@ 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 |
@@ 141-160 (lines=20) @@ | ||
138 | * |
|
139 | * @return HtmlDomParser |
|
140 | */ |
|
141 | public static function __callStatic($name, $arguments) |
|
142 | { |
|
143 | $arguments0 = $arguments[0] ?? ''; |
|
144 | ||
145 | $arguments1 = $arguments[1] ?? null; |
|
146 | ||
147 | if ($name === 'str_get_html') { |
|
148 | $parser = new static(); |
|
149 | ||
150 | return $parser->loadHtml($arguments0, $arguments1); |
|
151 | } |
|
152 | ||
153 | if ($name === 'file_get_html') { |
|
154 | $parser = new static(); |
|
155 | ||
156 | return $parser->loadHtmlFile($arguments0, $arguments1); |
|
157 | } |
|
158 | ||
159 | throw new \BadMethodCallException('Method does not exist'); |
|
160 | } |
|
161 | ||
162 | /** @noinspection MagicMethodsValidityInspection */ |
|
163 |