Skip to content

Commit a81bb85

Browse files
author
Will Banfield
committed
removed all of the unused 'use' files
1 parent ece9a00 commit a81bb85

File tree

5 files changed

+12
-40
lines changed

5 files changed

+12
-40
lines changed

src/GridFS/Bucket.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22
namespace MongoDB\GridFS;
33

44
use MongoDB\Collection;
5-
use MongoDB\Database;
65
use MongoDB\BSON\ObjectId;
7-
use MongoDB\Driver\ReadPreference;
8-
use MongoDB\Driver\WriteConcern;
96
use MongoDB\Driver\Manager;
10-
use MongoDB\Exception\InvalidArgumentException;
11-
use MongoDB\Exception\InvalidArgumentTypeException;
12-
use MongoDB\Exception\RuntimeException;
13-
use MongoDB\Exception\UnexpectedValueException;
147
/**
15-
* Bucket abstracts the GridFS files and chunks collections.
16-
*
178
* @api
9+
* Bucket abstracts the GridFS files and chunks collections.
1810
*/
1911
class Bucket
2012
{

src/GridFS/GridFSCollectionsWrapper.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@
22
namespace MongoDB\GridFS;
33

44
use MongoDB\Collection;
5-
use MongoDB\Database;
6-
use MongoDB\BSON\ObjectId;
75
use MongoDB\Driver\ReadPreference;
86
use MongoDB\Driver\WriteConcern;
97
use MongoDB\Driver\Manager;
10-
use MongoDB\Exception\InvalidArgumentException;
118
use MongoDB\Exception\InvalidArgumentTypeException;
12-
use MongoDB\Exception\RuntimeException;
13-
use MongoDB\Exception\UnexpectedValueException;
149
/**
15-
* Bucket abstracts the GridFS files and chunks collections.
16-
*
10+
* @internal
11+
* GridFSCollectionsWrapper abstracts the GridFS files and chunks collections.
1712
*/
18-
19-
//rename to context options
2013
class GridFSCollectionsWrapper
2114
{
2215
private $filesCollection;

src/GridFS/GridFsDownload.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
namespace MongoDB\GridFS;
33

44
use MongoDB\Collection;
5-
use MongoDB\Exception\RuntimeException;
6-
use MongoDB\BSON\ObjectId;
5+
use \MongoDB\Exception\GridFSCorruptFileException;
6+
use \MongoDB\Exception\InvalidArgumentTypeException;
7+
78
/**
9+
* @internal
810
* GridFSDownload abstracts the processes of downloading from a GridFSBucket
9-
*
1011
*/
1112
class GridFsDownload
1213
{
@@ -27,7 +28,7 @@ class GridFsDownload
2728
*
2829
* @param GridFSCollectionsWrapper $collectionsWrapper File options
2930
* @param \stdClass $file GridFS file to use
30-
* @throws GridFSCorruptFileException
31+
* @throws GridFSCorruptFileException, InvalidArgumentTypeException
3132
*/
3233
public function __construct(
3334
GridFSCollectionsWrapper $collectionsWrapper,
@@ -52,19 +53,12 @@ public function __construct(
5253
}
5354
$this->buffer = fopen('php://temp', 'w+');
5455
}
55-
/**
56-
* Reads data from a stream into GridFS
57-
*
58-
* @param Stream $source Source Stream
59-
* @return ObjectId
60-
*/
6156
public function downloadToStream($destination)
6257
{
6358
while($this->advanceChunks()) {
6459
fwrite($destination, $this->chunksIterator->current()->data->getData());
6560
}
6661
}
67-
6862
public function downloadNumBytes($numToRead) {
6963
$output = "";
7064
if ($this->bufferFresh) {

src/GridFS/GridFsUpload.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
namespace MongoDB\GridFS;
33

44
use MongoDB\Collection;
5-
use MongoDB\Exception\RuntimeException;
6-
use MongoDB\Exception\UnexpectedTypeException;
7-
use MongoDB\Exception\InvalidArgumentException;
5+
use MongoDB\Exception\InvalidArgumentTypeException;
86
use MongoDB\BSON;
97
/**
8+
* @internal
109
* GridFsupload abstracts the processes of inserting into a GridFSBucket
11-
*
1210
*/
1311
class GridFsUpload
1412
{
@@ -44,7 +42,7 @@ class GridFsUpload
4442
* @param GridFSCollectionsWrapper $collectionsWrapper Files Collection
4543
* @param string $filename Filename to insert
4644
* @param array $options File options
47-
* @throws InvalidArgumentException
45+
* @throws InvalidArgumentTypeException
4846
*/
4947
public function __construct(
5048
GridFsCollectionsWrapper $collectionsWrapper,

src/GridFS/StreamWrapper.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
<?php
22
namespace MongoDB\GridFS;
33

4-
use MongoDB\Driver\Server;
54
use MongoDB\Collection;
6-
use MongoDB\Exception\InvalidArgumentException;
7-
use MongoDB\Exception\InvalidArgumentTypeException;
8-
use MongoDB\Exception\RuntimeException;
9-
use MongoDB\Exception\UnexpectedValueException;
105

116
/**
127
* Stream wrapper for reading and writing a GridFS file.
138
*
149
* @internal
15-
* @see MongoDB\GridFS\Bucket::openUploadStream()
10+
* @see MongoDB\GridFS\Bucket::openUploadStream(), MongoDB\GridFS\Bucket::openDownloadStream()
1611
*/
1712
class StreamWrapper
1813
{

0 commit comments

Comments
 (0)