summaryrefslogtreecommitdiff
path: root/src/HTML5/Traverser.php
blob: f0771f06b7bab6e2f3a0fbdbd37bc2c4592ee771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace HTML5;

/**
 * Traverser for walking a DOM tree.
 *
 * This is a concrete traverser designed to convert a DOM tree into an 
 * HTML5 document. It is not intended to be a generic DOMTreeWalker 
 * implementation.
 */
class Traverser {

  protected $dom;
  protected $out;

  /**
   * Create a traverser.
   *
   * @param DOMNode $dom
   *   The document or node to traverse.
   * @param resource $out
   *   A stream that allows writing. The traverser will output into this 
   *   stream.
   */
  public function __construct($dom, $out) {
    $this->dom = $dom;
    $this->out = $out;
  }

  /**
   * Tell the traverser to walk the DOM.
   */
  public function walk() {
  }

}