Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
8fe879af
Commit
8fe879af
authored
Jan 07, 2016
by
Will Banfield
Committed by
Jeremy Mikola
Mar 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed all of the unused 'use' files
parent
9d9965b6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
40 deletions
+12
-40
Bucket.php
src/GridFS/Bucket.php
+1
-9
GridFSCollectionsWrapper.php
src/GridFS/GridFSCollectionsWrapper.php
+2
-9
GridFsDownload.php
src/GridFS/GridFsDownload.php
+5
-11
GridFsUpload.php
src/GridFS/GridFsUpload.php
+3
-5
StreamWrapper.php
src/GridFS/StreamWrapper.php
+1
-6
No files found.
src/GridFS/Bucket.php
View file @
8fe879af
...
...
@@ -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
{
...
...
src/GridFS/GridFSCollectionsWrapper.php
View file @
8fe879af
...
...
@@ -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
;
...
...
src/GridFS/GridFsDownload.php
View file @
8fe879af
...
...
@@ -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
)
{
...
...
src/GridFS/GridFsUpload.php
View file @
8fe879af
...
...
@@ -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 InvalidArgument
Type
Exception
*/
public
function
__construct
(
GridFsCollectionsWrapper
$collectionsWrapper
,
...
...
src/GridFS/StreamWrapper.php
View file @
8fe879af
<?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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment