PHP Class MongoGridFSCursor

Inheritance: extends MongoCursor
Show file Open project: alcaeus/mongo-php-adapter Class Usage Examples

Public Properties

Property Type Description
$slaveOkay

Protected Properties

Property Type Description
$gridfs

Public Methods

Method Description
__construct ( MongoGridFS $gridfs, MongoClient $connection, string $ns, array $query = [], array $fields = [] ) Create a new cursor
current ( ) : MongoGridFSFile Returns the current file
key ( ) : string Returns the current result's filename

Method Details

__construct() public method

Create a new cursor
public __construct ( MongoGridFS $gridfs, MongoClient $connection, string $ns, array $query = [], array $fields = [] )
$gridfs MongoGridFS Related GridFS collection
$connection MongoClient Database connection
$ns string Full name of database and collection
$query array Database query
$fields array Fields to return

current() public method

Returns the current file
public current ( ) : MongoGridFSFile
return MongoGridFSFile The current file

key() public method

Returns the current result's filename
public key ( ) : string
return string The current results filename

Property Details

$slaveOkay public static property

public static $slaveOkay