public function remove($key, $type=null) {
        $child = $this->get($key, $type);
        if ($child !== false) {
            foreach ($this->collection as $colkey => $node) {
                if ($node->key === $key && (is_null($type) || $node->type == $type)) {
                    unset($this->collection[$colkey]);
                    $this->collection = array_values($this->collection);
                    break;
                }
            }
            unset($this->orderedcollection[$child->type][$child->key]);
            $this->count--;
            return true;
        }
        return false;
    }
public function remove($key, $type=null) {
        $child = $this->get($key, $type);
        if ($child !== false) {
            foreach ($this->collection as $colkey => $node) {
                if ($node->key === $key && (is_null($type) || $node->type == $type)) {
                    unset($this->collection[$colkey]);
                    $this->collection = array_values($this->collection);
                    break;
                }
            }
            unset($this->orderedcollection[$child->type][$child->key]);
            $this->count--;
            return true;
        }
        return false;
    }
public function remove ( $ key , $ type = null ) { $ child = $ this -> get ( $ key , $ type ) ; if ( $ child !== false ) { foreach ( $ this -> collection as $ colkey => $ node ) { if ( $ node -> key === $ key && ( is_null ( $ type ) || $ node -> type == $ type ) ) { unset ( $ this -> collection [ $ colkey ] ) ; $ this -> collection = array_values ( $ this -> collection ) ; break ; } } unset ( $ this -> orderedcollection [ $ child -> type ] [ $ child -> key ] ) ; $ this -> count -- ; return true ; } return false ; }
Removes the node with the given key and type from the collection

@param string|int $key The key of the node we want to find.
@param int $type
@return bool
Removes the node with the given key and type from the collection