public function drop($collection, array $options = [])
    {
        $collectionName = $this->getCollectionName($collection);

        if ($this->isValidCollectionId($collectionName)) {
            throw new ClientException('Cannot alter a collection without a collection id');
        }

        $appendix = '';
        if (is_array($options) && isset($options['isSystem'])) {
            $appendix = '?isSystem=' . UrlHelper::getBoolString($options['isSystem']);
        }

        $this->getConnection()->delete(UrlHelper::buildUrl(Urls::URL_COLLECTION, [$collectionName]) . $appendix);

        return true;
    }
public function drop($collection, array $options = [])
    {
        $collectionName = $this->getCollectionName($collection);

        if ($this->isValidCollectionId($collectionName)) {
            throw new ClientException('Cannot alter a collection without a collection id');
        }

        $appendix = '';
        if (is_array($options) && isset($options['isSystem'])) {
            $appendix = '?isSystem=' . UrlHelper::getBoolString($options['isSystem']);
        }

        $this->getConnection()->delete(UrlHelper::buildUrl(Urls::URL_COLLECTION, [$collectionName]) . $appendix);

        return true;
    }
public function drop ( $ collection , array $ options = [ ] ) { $ collectionName = $ this -> getCollectionName ( $ collection ) ; if ( $ this -> isValidCollectionId ( $ collectionName ) ) { throw new ClientException ( 'Cannot alter a collection without a collection id' ) ; } $ appendix = '' ; if ( is_array ( $ options ) && isset ( $ options [ 'isSystem' ] ) ) { $ appendix = '?isSystem=' . UrlHelper :: getBoolString ( $ options [ 'isSystem' ] ) ; } $ this -> getConnection ( ) -> delete ( UrlHelper :: buildUrl ( Urls :: URL_COLLECTION , [ $ collectionName ] ) . $ appendix ) ; return true ; }
Drop a collection

@throws Exception

@param mixed $collection - collection id as string or number or collection object
@param array $options    - an array of options for the drop operation

@return bool - always true, will throw if there is an error
Drop a collection