Пример #1
0
 /**
  * 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
  */
 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;
 }