function Traverser::__construct
Same name in this branch
- 11.1.x vendor/mck89/peast/lib/Peast/Traverser.php \Peast\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 of 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 46
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);
}