src/Nodes/SVGNodeContainer.php
public function removeChild($child)
    {
        $index = $this->resolveChildIndex($child);
        if ($index === false) {
            return $this;
        }

        $node         = $this->children[$index];
        $node->parent = null;

        array_splice($this->children, $index, 1);

        return $this;
    }
public function removeChild($child)
    {
        $index = $this->resolveChildIndex($child);
        if ($index === false) {
            return $this;
        }

        $node         = $this->children[$index];
        $node->parent = null;

        array_splice($this->children, $index, 1);

        return $this;
    }
public function removeChild ( $ child ) { $ index = $ this -> resolveChildIndex ( $ child ) ; if ( $ index === false ) { return $ this ; } $ node = $ this -> children [ $ index ] ; $ node -> parent = null ; array_splice ( $ this -> children , $ index , 1 ) ; return $ this ; }
Removes a child node, given either as its instance or as the index it's
located at, from this container.

@param SVGNode|int $child The node (or respective index) to remove.

@return $this This node instance, for call chaining.
Removes a child node given either as its instance or as the index it s located at from this container .