Compile the document into an HTML string and return as a string.
$doc = new \hexydec\html\htmldoc();
if ($doc->load($html)) {
$doc->html($options);
}
Parameter | Type | Options | Description | Default |
---|---|---|---|---|
$options |
Array | An array of output options, the input is merged with `htmldoc::$config['output']`. Note that for most scenarios, specifying this argument is not required | [] |
|
quotestyle |
Defines how to quote the attributes in the output, either double , single , or minimal . Note that using the minify() method using the option 'quotes' => true will change the default setting to minimal |
"double" |
||
singletonclose |
A string defining how singleton tags will be closed. if false the renderer will follow the value defined in tag::$singleton , which is set by the parser. Note that using the minify() method using the option 'singleton' => true will change the default setting to > |
false |
||
closetags |
A boolean specifying whether to force elements to render a closing tag. If false , the renderer will follow the value defined in tag::$close (Which will be set according to whether the tag had no closing tag when the document was parsed, or may be set to false if the document has been minified with minify() ) |
false |
||
xml |
A boolean specifying whether to render XML compliant output. Setting this to true automatically sets quotestyle = "double" , singletonclose = "/>" , and closetag = true |
false |
||
elements |
An array specifying output options for specific tags | [ |
Returns the rendered HTML as a string.