public function Traverser::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/masterminds/html5/src/HTML5/Serializer/Traverser.php \Masterminds\HTML5\Serializer\Traverser::__construct()
Create a traverser.
Parameters
DOMNode|DOMNodeList $dom: The document or node to traverse.
resource $out: A stream that allows writing. The traverser will output into this stream.
array $options: An array or options for the traverser as key/value pairs. These include:
- encode_entities: A bool to specify if full encding should happen for all named
charachter references. Defaults to false which escapes &'<>".
- output_rules: The path to the class handling the output rules.
File
- vendor/
masterminds/ html5/ src/ HTML5/ Serializer/ Traverser.php, line 49
Class
- Traverser
- Traverser for walking a DOM tree.
Namespace
Masterminds\HTML5\SerializerCode
public function __construct($dom, $out, RulesInterface $rules, $options = array()) {
$this->dom = $dom;
$this->out = $out;
$this->rules = $rules;
$this->options = $options;
$this->rules
->setTraverser($this);
}