Skip to content

Commit 1acb69e

Browse files
committed
fix bug in File Collection
1 parent 71d0b01 commit 1acb69e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/file/Collection.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,31 +128,30 @@ public function getFileCollection($refresh = false)
128128
'name' => $this->name
129129
]);
130130
}
131-
132131
return $this->_fileCollection;
133132
}
134133

135134
/**
136135
* {@inheritdoc}
137136
*/
138-
public function drop()
137+
public function drop($execOptions = [])
139138
{
140-
return parent::drop() && $this->database->dropCollection($this->getChunkCollection()->name);
139+
return parent::drop($execOptions) && $this->database->dropCollection($this->getChunkCollection()->name,$execOptions);
141140
}
142141

143142
/**
144143
* {@inheritdoc}
145144
* @return Cursor cursor for the search results
146145
*/
147-
public function find($condition = [], $fields = [], $options = [])
146+
public function find($condition = [], $fields = [], $options = [], $execOptions = [])
148147
{
149-
return new Cursor($this, parent::find($condition, $fields, $options));
148+
return new Cursor($this, parent::find($condition, $fields, $options, $execOptions));
150149
}
151150

152151
/**
153152
* {@inheritdoc}
154153
*/
155-
public function remove($condition = [], $options = [])
154+
public function remove($condition = [], $options = [], $execOptions = [])
156155
{
157156
$fileCollection = $this->getFileCollection();
158157
$chunkCollection = $this->getChunkCollection();
@@ -166,7 +165,7 @@ public function remove($condition = [], $options = [])
166165

167166
$batchSize = 200;
168167
$options['batchSize'] = $batchSize;
169-
$cursor = $fileCollection->find($condition, ['_id'], $options);
168+
$cursor = $fileCollection->find($condition, ['_id'], $options, $execOptions);
170169
unset($options['limit']);
171170
$deleteCount = 0;
172171
$deleteCallback = function ($ids) use ($fileCollection, $chunkCollection, $options) {

0 commit comments

Comments
 (0)