Example #1
0
 /**
  * @param $name
  * @param $arguments
  *
  * @return HtmlDomParser
  */
 public static function __callStatic($name, $arguments)
 {
     $arguments0 = null;
     if (isset($arguments[0])) {
         $arguments0 = $arguments[0];
     }
     $arguments1 = null;
     if (isset($arguments[1])) {
         $arguments1 = $arguments[1];
     }
     if ($name === 'str_get_html') {
         $parser = new self();
         return $parser->loadHtml($arguments0, $arguments1);
     }
     if ($name === 'file_get_html') {
         $parser = new self();
         return $parser->loadHtmlFile($arguments0, $arguments1);
     }
     throw new BadMethodCallException('Method does not exist');
 }