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
184a57fb
Commit
184a57fb
authored
Sep 11, 2018
by
Marcin Pudełek
Committed by
Jeremy Mikola
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up class imports and doc blocks
parent
d7c3cc48
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
37 additions
and
6 deletions
+37
-6
ChangeStream.php
src/ChangeStream.php
+2
-0
Client.php
src/Client.php
+3
-1
Collection.php
src/Collection.php
+1
-0
Database.php
src/Database.php
+1
-0
Bucket.php
src/GridFS/Bucket.php
+1
-0
CollectionWrapper.php
src/GridFS/CollectionWrapper.php
+1
-0
StreamWrapper.php
src/GridFS/StreamWrapper.php
+1
-0
BSONDocument.php
src/Model/BSONDocument.php
+3
-0
BSONIterator.php
src/Model/BSONIterator.php
+1
-0
CollectionInfo.php
src/Model/CollectionInfo.php
+3
-0
DatabaseInfo.php
src/Model/DatabaseInfo.php
+3
-0
IndexInfo.php
src/Model/IndexInfo.php
+3
-0
IndexInput.php
src/Model/IndexInput.php
+1
-1
TypeMapArrayIterator.php
src/Model/TypeMapArrayIterator.php
+7
-1
Aggregate.php
src/Operation/Aggregate.php
+1
-0
FindAndModify.php
src/Operation/FindAndModify.php
+1
-0
ListCollections.php
src/Operation/ListCollections.php
+0
-2
ModifyCollection.php
src/Operation/ModifyCollection.php
+2
-1
functions.php
src/functions.php
+2
-0
No files found.
src/ChangeStream.php
View file @
184a57fb
...
@@ -97,6 +97,7 @@ class ChangeStream implements Iterator
...
@@ -97,6 +97,7 @@ class ChangeStream implements Iterator
/**
/**
* @see http://php.net/iterator.next
* @see http://php.net/iterator.next
* @return void
* @return void
* @throws ResumeTokenException
*/
*/
public
function
next
()
public
function
next
()
{
{
...
@@ -128,6 +129,7 @@ class ChangeStream implements Iterator
...
@@ -128,6 +129,7 @@ class ChangeStream implements Iterator
/**
/**
* @see http://php.net/iterator.rewind
* @see http://php.net/iterator.rewind
* @return void
* @return void
* @throws ResumeTokenException
*/
*/
public
function
rewind
()
public
function
rewind
()
{
{
...
...
src/Client.php
View file @
184a57fb
...
@@ -20,6 +20,7 @@ namespace MongoDB;
...
@@ -20,6 +20,7 @@ namespace MongoDB;
use
MongoDB\Driver\Manager
;
use
MongoDB\Driver\Manager
;
use
MongoDB\Driver\ReadConcern
;
use
MongoDB\Driver\ReadConcern
;
use
MongoDB\Driver\ReadPreference
;
use
MongoDB\Driver\ReadPreference
;
use
MongoDB\Driver\Session
;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Driver\Exception\InvalidArgumentException
as
DriverInvalidArgumentException
;
use
MongoDB\Driver\Exception\InvalidArgumentException
as
DriverInvalidArgumentException
;
...
@@ -217,6 +218,7 @@ class Client
...
@@ -217,6 +218,7 @@ class Client
* List databases.
* List databases.
*
*
* @see ListDatabases::__construct() for supported options
* @see ListDatabases::__construct() for supported options
* @param array $options
* @return DatabaseInfoIterator
* @return DatabaseInfoIterator
* @throws UnexpectedValueException if the command response was malformed
* @throws UnexpectedValueException if the command response was malformed
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws InvalidArgumentException for parameter/option parsing errors
...
@@ -268,7 +270,7 @@ class Client
...
@@ -268,7 +270,7 @@ class Client
*
*
* @see http://php.net/manual/en/mongodb-driver-manager.startsession.php
* @see http://php.net/manual/en/mongodb-driver-manager.startsession.php
* @param array $options Session options
* @param array $options Session options
* @return
MongoDB\Driver\
Session
* @return Session
*/
*/
public
function
startSession
(
array
$options
=
[])
public
function
startSession
(
array
$options
=
[])
{
{
...
...
src/Collection.php
View file @
184a57fb
...
@@ -896,6 +896,7 @@ class Collection
...
@@ -896,6 +896,7 @@ class Collection
* Returns information for all indexes for the collection.
* Returns information for all indexes for the collection.
*
*
* @see ListIndexes::__construct() for supported options
* @see ListIndexes::__construct() for supported options
* @param array $options
* @return IndexInfoIterator
* @return IndexInfoIterator
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
...
...
src/Database.php
View file @
184a57fb
...
@@ -350,6 +350,7 @@ class Database
...
@@ -350,6 +350,7 @@ class Database
* @param string $collectionName Collection or view to modify
* @param string $collectionName Collection or view to modify
* @param array $collectionOptions Collection or view options to assign
* @param array $collectionOptions Collection or view options to assign
* @param array $options Command options
* @param array $options Command options
* @return array|object
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
*/
*/
...
...
src/GridFS/Bucket.php
View file @
184a57fb
...
@@ -25,6 +25,7 @@ use MongoDB\Driver\ReadPreference;
...
@@ -25,6 +25,7 @@ use MongoDB\Driver\ReadPreference;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\Exception\UnsupportedException
;
use
MongoDB\GridFS\Exception\CorruptFileException
;
use
MongoDB\GridFS\Exception\CorruptFileException
;
use
MongoDB\GridFS\Exception\FileNotFoundException
;
use
MongoDB\GridFS\Exception\FileNotFoundException
;
use
MongoDB\Operation\Find
;
use
MongoDB\Operation\Find
;
...
...
src/GridFS/CollectionWrapper.php
View file @
184a57fb
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
namespace
MongoDB\GridFS
;
namespace
MongoDB\GridFS
;
use
MongoDB\Collection
;
use
MongoDB\Collection
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\UpdateResult
;
use
MongoDB\UpdateResult
;
use
MongoDB\Driver\Cursor
;
use
MongoDB\Driver\Cursor
;
use
MongoDB\Driver\Manager
;
use
MongoDB\Driver\Manager
;
...
...
src/GridFS/StreamWrapper.php
View file @
184a57fb
...
@@ -96,6 +96,7 @@ class StreamWrapper
...
@@ -96,6 +96,7 @@ class StreamWrapper
* @param string $mode Mode used to open the file (only "r" and "w" are supported)
* @param string $mode Mode used to open the file (only "r" and "w" are supported)
* @param integer $options Additional flags set by the streams API
* @param integer $options Additional flags set by the streams API
* @param string $openedPath Not used
* @param string $openedPath Not used
* @return boolean
*/
*/
public
function
stream_open
(
$path
,
$mode
,
$options
,
&
$openedPath
)
public
function
stream_open
(
$path
,
$mode
,
$options
,
&
$openedPath
)
{
{
...
...
src/Model/BSONDocument.php
View file @
184a57fb
...
@@ -49,6 +49,9 @@ class BSONDocument extends ArrayObject implements JsonSerializable, Serializable
...
@@ -49,6 +49,9 @@ class BSONDocument extends ArrayObject implements JsonSerializable, Serializable
* by default.
* by default.
*
*
* @see http://php.net/arrayobject.construct
* @see http://php.net/arrayobject.construct
* @param array $input
* @param integer $flags
* @param string $iterator_class
*/
*/
public
function
__construct
(
$input
=
[],
$flags
=
ArrayObject
::
ARRAY_AS_PROPS
,
$iterator_class
=
'ArrayIterator'
)
public
function
__construct
(
$input
=
[],
$flags
=
ArrayObject
::
ARRAY_AS_PROPS
,
$iterator_class
=
'ArrayIterator'
)
{
{
...
...
src/Model/BSONIterator.php
View file @
184a57fb
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
namespace
MongoDB\Model
;
namespace
MongoDB\Model
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\Exception\UnexpectedValueException
;
use
MongoDB\Exception\UnexpectedValueException
;
use
MongoDB\Model\BSONDocument
;
use
MongoDB\Model\BSONDocument
;
use
Iterator
;
use
Iterator
;
...
...
src/Model/CollectionInfo.php
View file @
184a57fb
...
@@ -134,6 +134,8 @@ class CollectionInfo implements ArrayAccess
...
@@ -134,6 +134,8 @@ class CollectionInfo implements ArrayAccess
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayaccess.offsetset
* @see http://php.net/arrayaccess.offsetset
* @param mixed $key
* @param mixed $value
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetSet
(
$key
,
$value
)
public
function
offsetSet
(
$key
,
$value
)
...
@@ -145,6 +147,7 @@ class CollectionInfo implements ArrayAccess
...
@@ -145,6 +147,7 @@ class CollectionInfo implements ArrayAccess
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayaccess.offsetunset
* @see http://php.net/arrayaccess.offsetunset
* @param mixed $key
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetUnset
(
$key
)
public
function
offsetUnset
(
$key
)
...
...
src/Model/DatabaseInfo.php
View file @
184a57fb
...
@@ -112,6 +112,8 @@ class DatabaseInfo implements ArrayAccess
...
@@ -112,6 +112,8 @@ class DatabaseInfo implements ArrayAccess
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayaccess.offsetset
* @see http://php.net/arrayaccess.offsetset
* @param mixed $key
* @param mixed $value
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetSet
(
$key
,
$value
)
public
function
offsetSet
(
$key
,
$value
)
...
@@ -123,6 +125,7 @@ class DatabaseInfo implements ArrayAccess
...
@@ -123,6 +125,7 @@ class DatabaseInfo implements ArrayAccess
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayaccess.offsetunset
* @see http://php.net/arrayaccess.offsetunset
* @param mixed $key
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetUnset
(
$key
)
public
function
offsetUnset
(
$key
)
...
...
src/Model/IndexInfo.php
View file @
184a57fb
...
@@ -206,6 +206,8 @@ class IndexInfo implements ArrayAccess
...
@@ -206,6 +206,8 @@ class IndexInfo implements ArrayAccess
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayaccess.offsetset
* @see http://php.net/arrayaccess.offsetset
* @param mixed $key
* @param mixed $value
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetSet
(
$key
,
$value
)
public
function
offsetSet
(
$key
,
$value
)
...
@@ -217,6 +219,7 @@ class IndexInfo implements ArrayAccess
...
@@ -217,6 +219,7 @@ class IndexInfo implements ArrayAccess
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayaccess.offsetunset
* @see http://php.net/arrayaccess.offsetunset
* @param mixed $key
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetUnset
(
$key
)
public
function
offsetUnset
(
$key
)
...
...
src/Model/IndexInput.php
View file @
184a57fb
...
@@ -78,7 +78,7 @@ class IndexInput implements Serializable
...
@@ -78,7 +78,7 @@ class IndexInput implements Serializable
/**
/**
* Return the index name.
* Return the index name.
*
*
* @
param
string
* @
return
string
*/
*/
public
function
__toString
()
public
function
__toString
()
{
{
...
...
src/Model/TypeMapArrayIterator.php
View file @
184a57fb
...
@@ -46,6 +46,7 @@ class TypeMapArrayIterator extends ArrayIterator
...
@@ -46,6 +46,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayiterator.append
* @see http://php.net/arrayiterator.append
* @param mixed $value
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
append
(
$value
)
public
function
append
(
$value
)
...
@@ -124,9 +125,11 @@ class TypeMapArrayIterator extends ArrayIterator
...
@@ -124,9 +125,11 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayiterator.offsetset
* @see http://php.net/arrayiterator.offsetset
* @param mixed $index
* @param mixed $value
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetSet
(
$index
,
$
newval
)
public
function
offsetSet
(
$index
,
$
value
)
{
{
throw
BadMethodCallException
::
classIsImmutable
(
__CLASS__
);
throw
BadMethodCallException
::
classIsImmutable
(
__CLASS__
);
}
}
...
@@ -135,6 +138,7 @@ class TypeMapArrayIterator extends ArrayIterator
...
@@ -135,6 +138,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayiterator.offsetunset
* @see http://php.net/arrayiterator.offsetunset
* @param mixed $index
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
offsetUnset
(
$index
)
public
function
offsetUnset
(
$index
)
...
@@ -146,6 +150,7 @@ class TypeMapArrayIterator extends ArrayIterator
...
@@ -146,6 +150,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayiterator.uasort
* @see http://php.net/arrayiterator.uasort
* @param callable $cmp_function
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
uasort
(
$cmp_function
)
public
function
uasort
(
$cmp_function
)
...
@@ -157,6 +162,7 @@ class TypeMapArrayIterator extends ArrayIterator
...
@@ -157,6 +162,7 @@ class TypeMapArrayIterator extends ArrayIterator
* Not supported.
* Not supported.
*
*
* @see http://php.net/arrayiterator.uksort
* @see http://php.net/arrayiterator.uksort
* @param callable $cmp_function
* @throws BadMethodCallException
* @throws BadMethodCallException
*/
*/
public
function
uksort
(
$cmp_function
)
public
function
uksort
(
$cmp_function
)
...
...
src/Operation/Aggregate.php
View file @
184a57fb
...
@@ -336,6 +336,7 @@ class Aggregate implements Executable
...
@@ -336,6 +336,7 @@ class Aggregate implements Executable
* @see http://php.net/manual/en/mongodb-driver-server.executereadcommand.php
* @see http://php.net/manual/en/mongodb-driver-server.executereadcommand.php
* @see http://php.net/manual/en/mongodb-driver-server.executereadwritecommand.php
* @see http://php.net/manual/en/mongodb-driver-server.executereadwritecommand.php
* @param boolean $hasOutStage
* @param boolean $hasOutStage
* @param boolean $hasExplain
* @return array
* @return array
*/
*/
private
function
createOptions
(
$hasOutStage
,
$hasExplain
)
private
function
createOptions
(
$hasOutStage
,
$hasExplain
)
...
...
src/Operation/FindAndModify.php
View file @
184a57fb
...
@@ -236,6 +236,7 @@ class FindAndModify implements Executable, Explainable
...
@@ -236,6 +236,7 @@ class FindAndModify implements Executable, Explainable
/**
/**
* Create the findAndModify command document.
* Create the findAndModify command document.
*
*
* @param Server $server
* @return array
* @return array
*/
*/
private
function
createCommandDocument
(
Server
$server
)
private
function
createCommandDocument
(
Server
$server
)
...
...
src/Operation/ListCollections.php
View file @
184a57fb
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
namespace
MongoDB\Operation
;
namespace
MongoDB\Operation
;
use
MongoDB\Driver\Command
;
use
MongoDB\Driver\Command
;
use
MongoDB\Driver\Query
;
use
MongoDB\Driver\Server
;
use
MongoDB\Driver\Server
;
use
MongoDB\Driver\Session
;
use
MongoDB\Driver\Session
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
...
@@ -26,7 +25,6 @@ use MongoDB\Exception\InvalidArgumentException;
...
@@ -26,7 +25,6 @@ use MongoDB\Exception\InvalidArgumentException;
use
MongoDB\Model\CachingIterator
;
use
MongoDB\Model\CachingIterator
;
use
MongoDB\Model\CollectionInfoCommandIterator
;
use
MongoDB\Model\CollectionInfoCommandIterator
;
use
MongoDB\Model\CollectionInfoIterator
;
use
MongoDB\Model\CollectionInfoIterator
;
use
MongoDB\Model\CollectionInfoLegacyIterator
;
/**
/**
* Operation for the listCollections command.
* Operation for the listCollections command.
...
...
src/Operation/ModifyCollection.php
View file @
184a57fb
...
@@ -23,6 +23,7 @@ use MongoDB\Driver\Session;
...
@@ -23,6 +23,7 @@ use MongoDB\Driver\Session;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Driver\Exception\RuntimeException
as
DriverRuntimeException
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\Exception\UnsupportedException
;
/**
/**
* Operation for the collMod command.
* Operation for the collMod command.
...
@@ -57,7 +58,7 @@ class ModifyCollection implements Executable
...
@@ -57,7 +58,7 @@ class ModifyCollection implements Executable
*
*
* @param string $databaseName Database name
* @param string $databaseName Database name
* @param string $collectionName Collection or view to modify
* @param string $collectionName Collection or view to modify
* @param
string
$collectionOptions Collection or view options to assign
* @param
array
$collectionOptions Collection or view options to assign
* @param array $options Command options
* @param array $options Command options
* @throws InvalidArgumentException for parameter/option parsing errors
* @throws InvalidArgumentException for parameter/option parsing errors
*/
*/
...
...
src/functions.php
View file @
184a57fb
...
@@ -22,6 +22,7 @@ use MongoDB\Driver\ReadConcern;
...
@@ -22,6 +22,7 @@ use MongoDB\Driver\ReadConcern;
use
MongoDB\Driver\Server
;
use
MongoDB\Driver\Server
;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Driver\WriteConcern
;
use
MongoDB\Exception\InvalidArgumentException
;
use
MongoDB\Exception\InvalidArgumentException
;
use
ReflectionException
;
use
stdClass
;
use
stdClass
;
use
ReflectionClass
;
use
ReflectionClass
;
...
@@ -204,6 +205,7 @@ function is_string_array($input) {
...
@@ -204,6 +205,7 @@ function is_string_array($input) {
* @see https://bugs.php.net/bug.php?id=49664
* @see https://bugs.php.net/bug.php?id=49664
* @param mixed $element Value to be copied
* @param mixed $element Value to be copied
* @return mixed
* @return mixed
* @throws ReflectionException
*/
*/
function
recursive_copy
(
$element
)
{
function
recursive_copy
(
$element
)
{
if
(
is_array
(
$element
))
{
if
(
is_array
(
$element
))
{
...
...
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