finish nested comment implementation

This commit is contained in:
Thorsten Witteler 2017-10-24 02:57:44 +02:00
parent 0936de7c1d
commit b4ab9a5111
6 changed files with 279 additions and 254 deletions

View file

@ -28,7 +28,8 @@ class Comment
$comments[] = $this->value;
foreach($this->children as $child) {
$comments[] = $child->getContent($level + 1);
//$comments[] = $child->getContent($level + 1); //produces nested result array.
$comments = array_merge($comments, $child->getContent($level + 1)); //produces flat result array.
}
return $comments;
}