public function HTML5::loadHTMLFragment in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/masterminds/html5/src/HTML5.php \Masterminds\HTML5::loadHTMLFragment()
Parse a HTML fragment from a string.
Parameters
string $string: The html5 fragment as a string.
array $options: Configuration options when parsing the HTML
Return value
\DOMDocumentFragment A DOM fragment. The DOM is part of libxml, which is included with almost all distributions of PHP.
File
- vendor/
masterminds/ html5/ src/ HTML5.php, line 133
Class
- HTML5
- This class offers convenience methods for parsing and serializing HTML5. It is roughly designed to mirror the \DOMDocument class that is provided with most versions of PHP.
Namespace
MastermindsCode
public function loadHTMLFragment($string, array $options = array()) {
$input = new StringInputStream($string);
return $this
->parseFragment($input, $options);
}