/** * Merge another parent node into this node. * @param ParentNode $node */ public function mergeNode(ParentNode $node) { $child = $node->head; while ($child) { $next = $child->next; $this->appendChild($child); $child = $next; } foreach ($node->getChildProperties() as $name => $value) { $this->{$name} = $value; } }