PHP Class Doctrine\ODM\MongoDB\CommandCursor

Since: 1.1
Author: alcaeus ([email protected])
Inheritance: implements Doctrine\MongoDB\Iterator
Show file Open project: doctrine/mongodb-odm

Public Methods

Method Description
__construct ( Doctrine\MongoDB\CommandCursor $commandCursor, UnitOfWork $unitOfWork, ClassMetadata $class = null )
batchSize ( integer $num ) : self Wrapper method for MongoCommandCursor::batchSize().
count ( ) : integer Recreates the command cursor and counts its results.
current ( ) : object | array | null Wrapper method for MongoCommandCursor::current().
dead ( ) : boolean Wrapper method for MongoCommandCursor::dead().
getBaseCursor ( ) : Doctrine\MongoDB\CommandCursor Returns the MongoCommandCursor instance being wrapped.
getSingleResult ( ) : object | array | null Rewinds the cursor and returns its first result.
info ( ) : array Wrapper method for MongoCommandCursor::info().
key ( ) : integer Wrapper method for MongoCommandCursor::key().
next ( ) Wrapper method for MongoCommandCursor::next().
rewind ( ) : array Wrapper method for MongoCommandCursor::rewind().
timeout ( integer $ms ) : self Wrapper method for MongoCommandCursor::timeout().
toArray ( ) : array Return the cursor's results as an array.
valid ( ) : boolean Wrapper method for MongoCommandCursor::valid().

Private Methods

Method Description
hydrateDocument ( array $document ) : array | object | null

Method Details

__construct() public method

public __construct ( Doctrine\MongoDB\CommandCursor $commandCursor, UnitOfWork $unitOfWork, ClassMetadata $class = null )
$commandCursor Doctrine\MongoDB\CommandCursor The ComamndCursor instance being wrapped
$unitOfWork UnitOfWork
$class Doctrine\ODM\MongoDB\Mapping\ClassMetadata The class to use for hydration or null if results should not be hydrated

batchSize() public method

Wrapper method for MongoCommandCursor::batchSize().
See also: http://php.net/manual/en/mongocommandcursor.batchsize.php
public batchSize ( integer $num ) : self
$num integer
return self

count() public method

Recreates the command cursor and counts its results.
See also: http://php.net/manual/en/countable.count.php
public count ( ) : integer
return integer

current() public method

Wrapper method for MongoCommandCursor::current().
See also: http://php.net/manual/en/iterator.current.php
See also: http://php.net/manual/en/mongocommandcursor.current.php
public current ( ) : object | array | null
return object | array | null

dead() public method

Wrapper method for MongoCommandCursor::dead().
See also: http://php.net/manual/en/mongocommandcursor.dead.php
public dead ( ) : boolean
return boolean

getBaseCursor() public method

Returns the MongoCommandCursor instance being wrapped.
public getBaseCursor ( ) : Doctrine\MongoDB\CommandCursor
return Doctrine\MongoDB\CommandCursor

getSingleResult() public method

Rewinds the cursor and returns its first result.
See also: Iterator::getSingleResult()
public getSingleResult ( ) : object | array | null
return object | array | null

info() public method

Wrapper method for MongoCommandCursor::info().
See also: http://php.net/manual/en/mongocommandcursor.info.php
public info ( ) : array
return array

key() public method

Wrapper method for MongoCommandCursor::key().
See also: http://php.net/manual/en/iterator.key.php
See also: http://php.net/manual/en/mongocommandcursor.key.php
public key ( ) : integer
return integer

next() public method

Wrapper method for MongoCommandCursor::next().
See also: http://php.net/manual/en/iterator.next.php
See also: http://php.net/manual/en/mongocommandcursor.next.php
public next ( )

rewind() public method

Wrapper method for MongoCommandCursor::rewind().
See also: http://php.net/manual/en/iterator.rewind.php
See also: http://php.net/manual/en/mongocommandcursor.rewind.php
public rewind ( ) : array
return array

timeout() public method

Wrapper method for MongoCommandCursor::timeout().
See also: http://php.net/manual/en/mongocommandcursor.timeout.php
public timeout ( integer $ms ) : self
$ms integer
return self

toArray() public method

Return the cursor's results as an array.
See also: Iterator::toArray()
public toArray ( ) : array
return array

valid() public method

Wrapper method for MongoCommandCursor::valid().
See also: http://php.net/manual/en/iterator.valid.php
See also: http://php.net/manual/en/mongocommandcursor.valid.php
public valid ( ) : boolean
return boolean