public function removeChild($childNode)
    {
        if ($childNode instanceof Element) {
            $childNode = $childNode->getNode();
        }

        if (!$childNode instanceof DOMNode) {
            throw new InvalidArgumentException(sprintf('Argument 1 passed to %s must be an instance of %s or DOMNode, %s given', __METHOD__, __CLASS__, (is_object($childNode) ? get_class($childNode) : gettype($childNode))));
        }

        $removedNode = $this->node->removeChild($childNode);

        return new Element($removedNode);
    }
public function removeChild($childNode)
    {
        if ($childNode instanceof Element) {
            $childNode = $childNode->getNode();
        }

        if (!$childNode instanceof DOMNode) {
            throw new InvalidArgumentException(sprintf('Argument 1 passed to %s must be an instance of %s or DOMNode, %s given', __METHOD__, __CLASS__, (is_object($childNode) ? get_class($childNode) : gettype($childNode))));
        }

        $removedNode = $this->node->removeChild($childNode);

        return new Element($removedNode);
    }
public function removeChild ( $ childNode ) { if ( $ childNode instanceof Element ) { $ childNode = $ childNode -> getNode ( ) ; } if ( ! $ childNode instanceof DOMNode ) { throw new InvalidArgumentException ( sprintf ( 'Argument 1 passed to %s must be an instance of %s or DOMNode, %s given' , __METHOD__ , __CLASS__ , ( is_object ( $ childNode ) ? get_class ( $ childNode ) : gettype ( $ childNode ) ) ) ) ; } $ removedNode = $ this -> node -> removeChild ( $ childNode ) ; return new Element ( $ removedNode ) ; }
Removes child from list of children.

@param \DOMNode|\DiDom\Element $childNode

@return \DiDom\Element the node that has been removed
Removes child from list of children .