PHP Class MongoLite\Cursor

Inheritance: implements Iterator, implements Countable
Afficher le fichier Open project: sjardim/Hugopit

Protected Properties

Свойство Type Description
$collection object
$criteria string | null
$data array
$limit null | integer
$position boolean | integer
$projection array | null
$skip null | integer
$sort null | array

Méthodes publiques

Méthode Description
__construct ( object $collection, mixed $criteria, $projection = null ) Constructor
count ( ) : integer Documents count
current ( )
each ( mixed $callable ) : object Loop through result set
key ( )
limit ( mixed $limit ) : object Set limit
next ( )
rewind ( ) Iterator implementation
skip ( mixed $skip ) : object Set skip
sort ( mixed $sorts ) : object Set sort
toArray ( ) : array Get documents matching criteria
valid ( )

Méthodes protégées

Méthode Description
getData ( ) : array Get documents matching criteria

Method Details

__construct() public méthode

Constructor
public __construct ( object $collection, mixed $criteria, $projection = null )
$collection object
$criteria mixed

count() public méthode

Documents count
public count ( ) : integer
Résultat integer

current() public méthode

public current ( )

each() public méthode

Loop through result set
public each ( mixed $callable ) : object
$callable mixed
Résultat object

getData() protected méthode

Get documents matching criteria
protected getData ( ) : array
Résultat array

key() public méthode

public key ( )

limit() public méthode

Set limit
public limit ( mixed $limit ) : object
$limit mixed
Résultat object Cursor

next() public méthode

public next ( )

rewind() public méthode

Iterator implementation
public rewind ( )

skip() public méthode

Set skip
public skip ( mixed $skip ) : object
$skip mixed
Résultat object Cursor

sort() public méthode

Set sort
public sort ( mixed $sorts ) : object
$sorts mixed
Résultat object Cursor

toArray() public méthode

Get documents matching criteria
public toArray ( ) : array
Résultat array

valid() public méthode

public valid ( )

Property Details

$collection protected_oe property

object
protected $collection

$criteria protected_oe property

protected string|null $criteria
Résultat string | null

$data protected_oe property

protected array $data
Résultat array

$limit protected_oe property

protected null|int $limit
Résultat null | integer

$position protected_oe property

protected bool|int $position
Résultat boolean | integer

$projection protected_oe property

protected array|null $projection
Résultat array | null

$skip protected_oe property

protected null|int $skip
Résultat null | integer

$sort protected_oe property

protected null|array $sort
Résultat null | array