format() public method

Formats HTML/Javascript
See also: format_html()
public format ( &$node )
Ejemplo n.º 1
0
/**
 * Format/beautify DOM
 * @param DomNode $root
 * @param array $options Extra formatting options {@link Formatter::$options}
 * @return bool
 */
function dom_format(&$root, $options = array())
{
    $formatter = new HtmlFormatter($options);
    return $formatter->format($root);
}