Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Traverser.php

function Traverser::__construct

Same name in this branch
  1. 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\Serializer

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal