PHP Class LMongo\Query\Cursor

Inheritance: implements Countabl\Countable, implements IteratorAggregat\IteratorAggregate
Datei anzeigen Open project: navruzm/lmongo

Protected Properties

Property Type Description
$cursor MongoCursor Instance of MongoCursor

Public Methods

Method Description
__call ( string $method, array $arguments ) : mixed Route the original MongoCursor method
__construct ( MongoCursor $cursor ) Constructor, sets the cursor
__toString ( ) : string Convert the cursor to string.
count ( ) : integer Implement Countable
countAll ( ) : integer Counts all query results
getCursor ( ) : MongoCursor Return the MongoCursor instance
getIterator ( ) : Iterator Implement IteratorAggregate
toArray ( ) : array Get the items as array.
toJson ( integer $options ) : string Get the items as JSON.
toObject ( ) : object Get the items as an object.

Method Details

__call() public method

Route the original MongoCursor method
public __call ( string $method, array $arguments ) : mixed
$method string
$arguments array
return mixed

__construct() public method

Constructor, sets the cursor
public __construct ( MongoCursor $cursor )
$cursor MongoCursor

__toString() public method

Convert the cursor to string.
public __toString ( ) : string
return string

count() public method

Implement Countable
public count ( ) : integer
return integer

countAll() public method

Counts all query results
public countAll ( ) : integer
return integer

getCursor() public method

Return the MongoCursor instance
public getCursor ( ) : MongoCursor
return MongoCursor

getIterator() public method

Implement IteratorAggregate
public getIterator ( ) : Iterator
return Iterator

toArray() public method

Get the items as array.
public toArray ( ) : array
return array

toJson() public method

Get the items as JSON.
public toJson ( integer $options ) : string
$options integer
return string

toObject() public method

Get the items as an object.
public toObject ( ) : object
return object

Property Details

$cursor protected_oe property

Instance of MongoCursor
protected MongoCursor $cursor
return MongoCursor