MongoCursor::__construct

(PECL mongo >=0.9.0)

MongoCursor::__constructCreate a new cursor

Description

public MongoCursor::__construct(
    MongoClient $connection,
    string $ns,
    array $query = array(),
    array $fields = array()
)

Parameters

connection

Database connection.

ns

Full name of database and collection.

query

Database query.

fields

Fields to return.

Return Values

Returns the new cursor.