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
30444c7a
Commit
30444c7a
authored
Apr 29, 2015
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Collection::_massageFindAndModifyOptions()
This was inadvertently removed in
495e46d4
.
parent
719fd253
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Collection.php
src/Collection.php
+20
-0
No files found.
src/Collection.php
View file @
30444c7a
...
@@ -1159,6 +1159,26 @@ class Collection
...
@@ -1159,6 +1159,26 @@ class Collection
return
$options
;
return
$options
;
}
}
/**
* Internal helper for massaging findandmodify options
* @internal
*/
final
protected
function
_massageFindAndModifyOptions
(
$options
,
$update
=
array
())
{
$ret
=
array
(
"sort"
=>
$options
[
"sort"
],
"new"
=>
isset
(
$options
[
"returnDocument"
])
?
$options
[
"returnDocument"
]
==
self
::
FIND_ONE_AND_RETURN_AFTER
:
false
,
"fields"
=>
$options
[
"projection"
],
"upsert"
=>
isset
(
$options
[
"upsert"
])
?
$options
[
"upsert"
]
:
false
,
);
if
(
$update
)
{
$ret
[
"update"
]
=
$update
;
}
else
{
$ret
[
"remove"
]
=
true
;
}
return
$ret
;
}
/**
/**
* Constructs the Query Wire Protocol field 'flags' based on $options
* Constructs the Query Wire Protocol field 'flags' based on $options
* provided to other helpers
* provided to other helpers
...
...
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