public function replaceNode($contentNodes) { $this->insertNodesBefore($contentNodes); return $this->getParentNode()->removeChild($this->getNode()); }