diff options
author | Matt Farina <[email protected]> | 2013-04-22 15:01:53 -0400 |
---|---|---|
committer | Matt Farina <[email protected]> | 2013-04-22 15:01:53 -0400 |
commit | a18cd857b0d1186831b386d6aa52c37212671e02 (patch) | |
tree | 4cde45930bdcc3245f1956317292dfcaa7fe478b /src/HTML5 | |
parent | da188b7251d151ae56773d7b1a3bb88a774fbdf3 (diff) |
Added documentation to the traverser
Diffstat (limited to 'src/HTML5')
-rw-r--r-- | src/HTML5/Serializer/Traverser.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/HTML5/Serializer/Traverser.php b/src/HTML5/Serializer/Traverser.php index 6d5e805..a066517 100644 --- a/src/HTML5/Serializer/Traverser.php +++ b/src/HTML5/Serializer/Traverser.php @@ -280,6 +280,15 @@ class Traverser { return (bool)preg_match('/^(' . self::$block_elements . ')$/i', $name); } + /** + * Is the element literal? + * + * @param mixed $element + * An element implementing DOMNode. + * + * @return boolean + * True if literal and false otherise. + */ protected function isLiteral($element) { if (!$element->parentNode) { return FALSE; @@ -288,13 +297,20 @@ class Traverser { } + /** + * Is an element local? + * + * @param mixed $ele + * An element that implement \DOMNode. + * + * @return bool + * True if local and false otherwise. + */ protected function isLocalElement($ele) { $uri = $ele->namespaceURI; if (empty($uri)) { return FALSE; } return isset(self::$local_ns[$uri]); - } - } |