public function load($html) {
        if ($html instanceof \DOMDocument) {
            $d = $html;
        } elseif ($html instanceof \DOMElement) {
            $d = $html->ownerDocument;
        } elseif ($html instanceof \SplFileInfo) {
            $d = new \DOMDocument();
            $d->preserveWhiteSpace = false;
            $d->validateOnParse = true;
            $d->loadHTMLFile($html->getPathname());
        } else {
            $d = new \DOMDocument();
            $d->preserveWhiteSpace = false;
            $d->validateOnParse = true;
            $d->loadHTML($html);
        }
        $d->formatOutput = false;
        $d->normalizeDocument();
        $this->doc = $d;
        return $this;
    }
public function load($html) {
        if ($html instanceof \DOMDocument) {
            $d = $html;
        } elseif ($html instanceof \DOMElement) {
            $d = $html->ownerDocument;
        } elseif ($html instanceof \SplFileInfo) {
            $d = new \DOMDocument();
            $d->preserveWhiteSpace = false;
            $d->validateOnParse = true;
            $d->loadHTMLFile($html->getPathname());
        } else {
            $d = new \DOMDocument();
            $d->preserveWhiteSpace = false;
            $d->validateOnParse = true;
            $d->loadHTML($html);
        }
        $d->formatOutput = false;
        $d->normalizeDocument();
        $this->doc = $d;
        return $this;
    }
public function load ( $ html ) { if ( $ html instanceof \ DOMDocument ) { $ d = $ html ; } elseif ( $ html instanceof \ DOMElement ) { $ d = $ html -> ownerDocument ; } elseif ( $ html instanceof \ SplFileInfo ) { $ d = new \ DOMDocument ( ) ; $ d -> preserveWhiteSpace = false ; $ d -> validateOnParse = true ; $ d -> loadHTMLFile ( $ html -> getPathname ( ) ) ; } else { $ d = new \ DOMDocument ( ) ; $ d -> preserveWhiteSpace = false ; $ d -> validateOnParse = true ; $ d -> loadHTML ( $ html ) ; } $ d -> formatOutput = false ; $ d -> normalizeDocument ( ) ; $ this -> doc = $ d ; return $ this ; }
Load an HTML document

@param \DOMDocument|\DOMElement|\SplFileInfo|string $html
@return PrettyMin
Load an HTML document