Skip to content

Commit cc137d4

Browse files
committed
Merge pull request #191
2 parents 5ffd050 + 96f46e0 commit cc137d4

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/GridFS/Bucket.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ public function __construct(Manager $manager, $databaseName, array $options = []
8585
* If the files collection document is not found, this method will still
8686
* attempt to delete orphaned chunks.
8787
*
88-
* @param ObjectId $id ObjectId of the file
88+
* @param mixed $id File ID
8989
* @throws FileNotFoundException
9090
*/
91-
public function delete(ObjectId $id)
91+
public function delete($id)
9292
{
9393
$file = $this->collectionWrapper->findFileById($id);
9494
$this->collectionWrapper->deleteFileAndChunksById($id);
@@ -101,11 +101,11 @@ public function delete(ObjectId $id)
101101
/**
102102
* Writes the contents of a GridFS file to a writable stream.
103103
*
104-
* @param ObjectId $id ObjectId of the file
104+
* @param mixed $id File ID
105105
* @param resource $destination Writable Stream
106106
* @throws FileNotFoundException
107107
*/
108-
public function downloadToStream(ObjectId $id, $destination)
108+
public function downloadToStream($id, $destination)
109109
{
110110
$file = $this->collectionWrapper->findFileById($id);
111111

@@ -136,7 +136,7 @@ public function downloadToStream(ObjectId $id, $destination)
136136
* * -2 = the second most recent revision
137137
* * -1 = the most recent revision
138138
*
139-
* @param string $filename File name
139+
* @param string $filename Filename
140140
* @param resource $destination Writable Stream
141141
* @param array $options Download options
142142
* @throws FileNotFoundException
@@ -208,11 +208,11 @@ public function getIdFromStream($stream)
208208
/**
209209
* Opens a readable stream for reading a GridFS file.
210210
*
211-
* @param ObjectId $id ObjectId of the file
211+
* @param mixed $id File ID
212212
* @return resource
213213
* @throws FileNotFoundException
214214
*/
215-
public function openDownloadStream(ObjectId $id)
215+
public function openDownloadStream($id)
216216
{
217217
$file = $this->collectionWrapper->findFileById($id);
218218

@@ -242,7 +242,7 @@ public function openDownloadStream(ObjectId $id)
242242
* * -2 = the second most recent revision
243243
* * -1 = the most recent revision
244244
*
245-
* @param string $filename File name
245+
* @param string $filename Filename
246246
* @param array $options Download options
247247
* @return resource
248248
* @throws FileNotFoundException
@@ -268,7 +268,7 @@ public function openDownloadStreamByName($filename, array $options = [])
268268
* * chunkSizeBytes (integer): The chunk size in bytes. Defaults to the
269269
* bucket's chunk size.
270270
*
271-
* @param string $filename File name
271+
* @param string $filename Filename
272272
* @param array $options Upload options
273273
* @return resource
274274
*/
@@ -291,11 +291,11 @@ public function openUploadStream($filename, array $options = [])
291291
/**
292292
* Renames the GridFS file with the specified ID.
293293
*
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
296296
* @throws FileNotFoundException
297297
*/
298-
public function rename(ObjectId $id, $newFilename)
298+
public function rename($id, $newFilename)
299299
{
300300
$updateResult = $this->collectionWrapper->updateFilenameForId($id, $newFilename);
301301

@@ -325,10 +325,10 @@ public function rename(ObjectId $id, $newFilename)
325325
* * chunkSizeBytes (integer): The chunk size in bytes. Defaults to the
326326
* bucket's chunk size.
327327
*
328-
* @param string $filename File name
328+
* @param string $filename Filename
329329
* @param resource $source Readable stream
330330
* @param array $options Stream options
331-
* @return ObjectId
331+
* @return ObjectId ID of the newly created GridFS file
332332
* @throws InvalidArgumentException
333333
*/
334334
public function uploadFromStream($filename, $source, array $options = [])

src/GridFS/WritableStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class WritableStream
4848
* collection document.
4949
*
5050
* @param CollectionWrapper $collectionWrapper GridFS collection wrapper
51-
* @param string $filename File name
51+
* @param string $filename Filename
5252
* @param array $options Upload options
5353
* @throws InvalidArgumentException
5454
*/

0 commit comments

Comments
 (0)