lib/CosmoW/Riak/GridFS.php
protected function doFindAndRemove(array $query, array $options = array())
    {
        $document = parent::doFindAndRemove($query, $options);

        if (isset($document)) {
            // Remove the file data from the chunks collection
            $this->riakCollection->chunks->remove(array('files_id' => $document['_id']), $options);
        }

        return $document;
    }
protected function doFindAndRemove(array $query, array $options = array())
    {
        $document = parent::doFindAndRemove($query, $options);

        if (isset($document)) {
            // Remove the file data from the chunks collection
            $this->riakCollection->chunks->remove(array('files_id' => $document['_id']), $options);
        }

        return $document;
    }
protected function doFindAndRemove ( array $ query , array $ options = array ( ) ) { $ document = parent :: doFindAndRemove ( $ query , $ options ) ; if ( isset ( $ document ) ) { // Remove the file data from the chunks collection $ this -> riakCollection -> chunks -> remove ( array ( 'files_id' => $ document [ '_id' ] ) , $ options ) ; } return $ document ; }
Execute the findAndModify command with the remove option and delete any
chunks for the document.

@see Collection::doFindAndRemove()
@param array $query
@param array $options
@return array|null
Execute the findAndModify command with the remove option and delete any chunks for the document .