diff --git a/modules/doc/library/Doc/DocToc.php b/modules/doc/library/Doc/DocToc.php new file mode 100644 index 000000000..db7d9cb03 --- /dev/null +++ b/modules/doc/library/Doc/DocToc.php @@ -0,0 +1,48 @@ +value = $value; + } + + public function getValue() + { + return $this->value; + } + + public function appendChild($value) + { + $child = new self($value); + $this->children[] = $child; + return $child; + } + + public function hasChildren() + { + return ! empty($this->children); + } + + public function getChildren() + { + return $this->children; + } + + public function getIterator() + { + return new TreeIterator($this); + } +}