protected function _genericDestroy($key, $type)
    {
        $listName = $this->_getCorrectList($type);

        if ($key) {
            $list = &$this->$listName;
            unset ($list[$key]);
        }
        $this->$listName = [];

        return $this;
    }
protected function _genericDestroy($key, $type)
    {
        $listName = $this->_getCorrectList($type);

        if ($key) {
            $list = &$this->$listName;
            unset ($list[$key]);
        }
        $this->$listName = [];

        return $this;
    }
protected function _genericDestroy ( $ key , $ type ) { $ listName = $ this -> _getCorrectList ( $ type ) ; if ( $ key ) { $ list = & $ this -> $ listName ; unset ( $ list [ $ key ] ) ; } $ this -> $ listName = [ ] ; return $ this ; }
common destroy data method for class data lists

@param string $key
@param string $type
@return $this
common destroy data method for class data lists