html[] = ''; } public function beginChildren() { $this->html[] = ''; } public function render($callback) { foreach ($this as $node) { $this->html[] = $callback($node->getValue()); } return implode("\n", $this->html); } }