/** * Creates an HTML document from file path * * @param string $path Give the file to load the HTML into DOM document * * @return \Duality\Structure\HtmlDoc A new HtmlDoc instance */ public static function createFromFilePath($path) { $doc = new HtmlDoc(); $template = new TextFile($path); $template->load(); $template->getContent(); $doc->loadFile($template); return $doc; }