Habari\HTMLDoc::__construct PHP Method

__construct() public method

Create a HTMLDoc object
public __construct ( string $html )
$html string The HTML to parse
    public function __construct($html)
    {
        $this->dom = new \DOMDocument();
        libxml_use_internal_errors(true);
        $this->dom->loadHTML($html);
        $this->xp = new \DOMXPath($this->dom);
    }