public function replaceAll($selector) { foreach (phpQuery::pq($selector, $this->getDocumentID()) as $node) { phpQuery::pq($node, $this->getDocumentID())->after($this->_clone())->remove(); } return $this; }