/**
* Remove records from this collection
*
* @param array $criteria - Description of records to remove.
* @param array $options - Options for remove. "justOne" Remove at
* most one record matching this criteria.
*
* @return bool|array - Returns an array containing the status of the
* removal if the "w" option is set. Otherwise, returns TRUE. Fields
* in the status array are described in the documentation for
* MongoCollection::insert().
*/
public function remove(array $criteria = [], array $options = [])
{
$timeout = MongoCursor::$timeout;
if (!empty($options['timeout'])) {
$timeout = $options['timeout'];
}
return $this->client->_getWriteProtocol()->opDelete($this->fqn, $criteria, $options, $timeout);
}