You are here

function simple_html_dom::__construct in simplehtmldom API 7

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom::__construct()
  2. 6 simplehtmldom/simple_html_dom.php \simple_html_dom::__construct()

File

simplehtmldom/simple_html_dom.php, line 512

Class

simple_html_dom

Code

function __construct($str = null) {
  if ($str) {
    if (preg_match("/^http:\\/\\//i", $str) || is_file($str)) {
      $this
        ->load_file($str);
    }
    else {
      $this
        ->load($str);
    }
  }
}