@@ -85,10 +85,10 @@ public function __construct(Manager $manager, $databaseName, array $options = []
85
85
* If the files collection document is not found, this method will still
86
86
* attempt to delete orphaned chunks.
87
87
*
88
- * @param ObjectId $id ObjectId of the file
88
+ * @param mixed $id File ID
89
89
* @throws FileNotFoundException
90
90
*/
91
- public function delete (ObjectId $ id )
91
+ public function delete ($ id )
92
92
{
93
93
$ file = $ this ->collectionWrapper ->findFileById ($ id );
94
94
$ this ->collectionWrapper ->deleteFileAndChunksById ($ id );
@@ -101,11 +101,11 @@ public function delete(ObjectId $id)
101
101
/**
102
102
* Writes the contents of a GridFS file to a writable stream.
103
103
*
104
- * @param ObjectId $id ObjectId of the file
104
+ * @param mixed $id File ID
105
105
* @param resource $destination Writable Stream
106
106
* @throws FileNotFoundException
107
107
*/
108
- public function downloadToStream (ObjectId $ id , $ destination )
108
+ public function downloadToStream ($ id , $ destination )
109
109
{
110
110
$ file = $ this ->collectionWrapper ->findFileById ($ id );
111
111
@@ -136,7 +136,7 @@ public function downloadToStream(ObjectId $id, $destination)
136
136
* * -2 = the second most recent revision
137
137
* * -1 = the most recent revision
138
138
*
139
- * @param string $filename File name
139
+ * @param string $filename Filename
140
140
* @param resource $destination Writable Stream
141
141
* @param array $options Download options
142
142
* @throws FileNotFoundException
@@ -208,11 +208,11 @@ public function getIdFromStream($stream)
208
208
/**
209
209
* Opens a readable stream for reading a GridFS file.
210
210
*
211
- * @param ObjectId $id ObjectId of the file
211
+ * @param mixed $id File ID
212
212
* @return resource
213
213
* @throws FileNotFoundException
214
214
*/
215
- public function openDownloadStream (ObjectId $ id )
215
+ public function openDownloadStream ($ id )
216
216
{
217
217
$ file = $ this ->collectionWrapper ->findFileById ($ id );
218
218
@@ -242,7 +242,7 @@ public function openDownloadStream(ObjectId $id)
242
242
* * -2 = the second most recent revision
243
243
* * -1 = the most recent revision
244
244
*
245
- * @param string $filename File name
245
+ * @param string $filename Filename
246
246
* @param array $options Download options
247
247
* @return resource
248
248
* @throws FileNotFoundException
@@ -268,7 +268,7 @@ public function openDownloadStreamByName($filename, array $options = [])
268
268
* * chunkSizeBytes (integer): The chunk size in bytes. Defaults to the
269
269
* bucket's chunk size.
270
270
*
271
- * @param string $filename File name
271
+ * @param string $filename Filename
272
272
* @param array $options Upload options
273
273
* @return resource
274
274
*/
@@ -291,11 +291,11 @@ public function openUploadStream($filename, array $options = [])
291
291
/**
292
292
* Renames the GridFS file with the specified ID.
293
293
*
294
- * @param ObjectId $id ID of the file to rename
295
- * @param string $newFilename New file name
294
+ * @param mixed $id File ID
295
+ * @param string $newFilename New filename
296
296
* @throws FileNotFoundException
297
297
*/
298
- public function rename (ObjectId $ id , $ newFilename )
298
+ public function rename ($ id , $ newFilename )
299
299
{
300
300
$ updateResult = $ this ->collectionWrapper ->updateFilenameForId ($ id , $ newFilename );
301
301
@@ -325,10 +325,10 @@ public function rename(ObjectId $id, $newFilename)
325
325
* * chunkSizeBytes (integer): The chunk size in bytes. Defaults to the
326
326
* bucket's chunk size.
327
327
*
328
- * @param string $filename File name
328
+ * @param string $filename Filename
329
329
* @param resource $source Readable stream
330
330
* @param array $options Stream options
331
- * @return ObjectId
331
+ * @return ObjectId ID of the newly created GridFS file
332
332
* @throws InvalidArgumentException
333
333
*/
334
334
public function uploadFromStream ($ filename , $ source , array $ options = [])
0 commit comments