summaryrefslogtreecommitdiff
path: root/src/HTML5/Traverser.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTML5/Traverser.php')
-rw-r--r--src/HTML5/Traverser.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/HTML5/Traverser.php b/src/HTML5/Traverser.php
new file mode 100644
index 0000000..f0771f0
--- /dev/null
+++ b/src/HTML5/Traverser.php
@@ -0,0 +1,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() {
+ }
+
+}