summaryrefslogtreecommitdiff
path: root/src/HTML5/Serializer/Traverser.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTML5/Serializer/Traverser.php')
-rw-r--r--src/HTML5/Serializer/Traverser.php35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/HTML5/Serializer/Traverser.php b/src/HTML5/Serializer/Traverser.php
index 399570d..a33943f 100644
--- a/src/HTML5/Serializer/Traverser.php
+++ b/src/HTML5/Serializer/Traverser.php
@@ -1,4 +1,5 @@
<?php
+
namespace Masterminds\HTML5\Serializer;
/**
@@ -12,14 +13,13 @@ namespace Masterminds\HTML5\Serializer;
*/
class Traverser
{
-
/**
* Namespaces that should be treated as "local" to HTML5.
*/
protected static $local_ns = array(
'http://www.w3.org/1999/xhtml' => 'html',
'http://www.w3.org/1998/Math/MathML' => 'math',
- 'http://www.w3.org/2000/svg' => 'svg'
+ 'http://www.w3.org/2000/svg' => 'svg',
);
protected $dom;
@@ -35,16 +35,13 @@ class Traverser
/**
* Create a traverser.
*
- * @param DOMNode|DOMNodeList $dom
- * The document or node to traverse.
- * @param resource $out
- * A stream that allows writing. The traverser will output into this
- * stream.
- * @param 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.
+ * @param \DOMNode|\DOMNodeList $dom The document or node to traverse
+ * @param resource $out A stream that allows writing. The traverser will output into this
+ * stream.
+ * @param 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.
*/
public function __construct($dom, $out, RulesInterface $rules, $options = array())
{
@@ -59,8 +56,7 @@ class Traverser
/**
* Tell the traverser to walk the DOM.
*
- * @return resource $out
- * Returns the output stream.
+ * @return resource $out Returns the output stream
*/
public function walk()
{
@@ -87,8 +83,7 @@ class Traverser
/**
* Process a node in the DOM.
*
- * @param mixed $node
- * A node implementing \DOMNode.
+ * @param mixed $node A node implementing \DOMNode
*/
public function node($node)
{
@@ -119,8 +114,7 @@ class Traverser
/**
* Walk through all the nodes on a node list.
*
- * @param \DOMNodeList $nl
- * A list of child elements to walk through.
+ * @param \DOMNodeList $nl A list of child elements to walk through
*/
public function children($nl)
{
@@ -132,10 +126,9 @@ class Traverser
/**
* Is an element local?
*
- * @param mixed $ele
- * An element that implement \DOMNode.
+ * @param mixed $ele An element that implement \DOMNode
*
- * @return bool True if local and false otherwise.
+ * @return bool true if local and false otherwise
*/
public function isLocalElement($ele)
{