Commit 8fe879af authored by Will Banfield's avatar Will Banfield Committed by Jeremy Mikola

removed all of the unused 'use' files

parent 9d9965b6
......@@ -2,19 +2,11 @@
namespace MongoDB\GridFS;
use MongoDB\Collection;
use MongoDB\Database;
use MongoDB\BSON\ObjectId;
use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern;
use MongoDB\Driver\Manager;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\InvalidArgumentTypeException;
use MongoDB\Exception\RuntimeException;
use MongoDB\Exception\UnexpectedValueException;
/**
* Bucket abstracts the GridFS files and chunks collections.
*
* @api
* Bucket abstracts the GridFS files and chunks collections.
*/
class Bucket
{
......
......@@ -2,21 +2,14 @@
namespace MongoDB\GridFS;
use MongoDB\Collection;
use MongoDB\Database;
use MongoDB\BSON\ObjectId;
use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern;
use MongoDB\Driver\Manager;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\InvalidArgumentTypeException;
use MongoDB\Exception\RuntimeException;
use MongoDB\Exception\UnexpectedValueException;
/**
* Bucket abstracts the GridFS files and chunks collections.
*
* @internal
* GridFSCollectionsWrapper abstracts the GridFS files and chunks collections.
*/
//rename to context options
class GridFSCollectionsWrapper
{
private $filesCollection;
......
......@@ -2,11 +2,12 @@
namespace MongoDB\GridFS;
use MongoDB\Collection;
use MongoDB\Exception\RuntimeException;
use MongoDB\BSON\ObjectId;
use \MongoDB\Exception\GridFSCorruptFileException;
use \MongoDB\Exception\InvalidArgumentTypeException;
/**
* @internal
* GridFSDownload abstracts the processes of downloading from a GridFSBucket
*
*/
class GridFsDownload
{
......@@ -27,7 +28,7 @@ class GridFsDownload
*
* @param GridFSCollectionsWrapper $collectionsWrapper File options
* @param \stdClass $file GridFS file to use
* @throws GridFSCorruptFileException
* @throws GridFSCorruptFileException, InvalidArgumentTypeException
*/
public function __construct(
GridFSCollectionsWrapper $collectionsWrapper,
......@@ -52,19 +53,12 @@ class GridFsDownload
}
$this->buffer = fopen('php://temp', 'w+');
}
/**
* Reads data from a stream into GridFS
*
* @param Stream $source Source Stream
* @return ObjectId
*/
public function downloadToStream($destination)
{
while($this->advanceChunks()) {
fwrite($destination, $this->chunksIterator->current()->data->getData());
}
}
public function downloadNumBytes($numToRead) {
$output = "";
if ($this->bufferFresh) {
......
......@@ -2,13 +2,11 @@
namespace MongoDB\GridFS;
use MongoDB\Collection;
use MongoDB\Exception\RuntimeException;
use MongoDB\Exception\UnexpectedTypeException;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\InvalidArgumentTypeException;
use MongoDB\BSON;
/**
* @internal
* GridFsupload abstracts the processes of inserting into a GridFSBucket
*
*/
class GridFsUpload
{
......@@ -44,7 +42,7 @@ class GridFsUpload
* @param GridFSCollectionsWrapper $collectionsWrapper Files Collection
* @param string $filename Filename to insert
* @param array $options File options
* @throws InvalidArgumentException
* @throws InvalidArgumentTypeException
*/
public function __construct(
GridFsCollectionsWrapper $collectionsWrapper,
......
<?php
namespace MongoDB\GridFS;
use MongoDB\Driver\Server;
use MongoDB\Collection;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Exception\InvalidArgumentTypeException;
use MongoDB\Exception\RuntimeException;
use MongoDB\Exception\UnexpectedValueException;
/**
* Stream wrapper for reading and writing a GridFS file.
*
* @internal
* @see MongoDB\GridFS\Bucket::openUploadStream()
* @see MongoDB\GridFS\Bucket::openUploadStream(), MongoDB\GridFS\Bucket::openDownloadStream()
*/
class StreamWrapper
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment