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
edb5dd6f
Commit
edb5dd6f
authored
Dec 21, 2015
by
Will Banfield
Committed by
Jeremy Mikola
Mar 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPLIB-149: implement find on files collection
parent
3269ce9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
Bucket.php
src/GridFS/Bucket.php
+0
-6
BucketReadWriter.php
src/GridFS/BucketReadWriter.php
+10
-1
No files found.
src/GridFS/Bucket.php
View file @
edb5dd6f
...
...
@@ -128,12 +128,6 @@ class Bucket
}
}
public
function
find
(
$filter
,
array
$options
=
[])
{
//add proper validation for the filter and for the options
return
$this
->
filesCollection
->
find
(
$filter
);
}
private
function
ensureIndexes
()
{
if
(
$this
->
ensuredIndexes
)
{
...
...
src/GridFS/BucketReadWriter.php
View file @
edb5dd6f
...
...
@@ -112,5 +112,14 @@ class BucketReadWriter
$gridFsStream
=
new
GridFsDownload
(
$this
->
bucket
,
null
,
$file
);
$gridFsStream
->
downloadToStream
(
$destination
);
}
/**
* Find files from the GridFS bucket files collection.
*
* @param array $filter filter to find by
* @param array $options options to
*/
public
function
find
(
$filter
,
array
$options
=
[])
{
return
$this
->
bucket
->
getFilesCollection
()
->
find
(
$filter
,
$options
);
}
}
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