PHP Class MongoLite\Cursor

Inheritance: implements Iterator, implements Countable
Mostrar archivo Open project: sjardim/Hugopit

Protected Properties

Property Type Description
$collection object
$criteria string | null
$data array
$limit null | integer
$position boolean | integer
$projection array | null
$skip null | integer
$sort null | array

Public Methods

Method 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 ( )

Protected Methods

Method Description
getData ( ) : array Get documents matching criteria

Method Details

__construct() public method

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

count() public method

Documents count
public count ( ) : integer
return integer

current() public method

public current ( )

each() public method

Loop through result set
public each ( mixed $callable ) : object
$callable mixed
return object

getData() protected method

Get documents matching criteria
protected getData ( ) : array
return array

key() public method

public key ( )

limit() public method

Set limit
public limit ( mixed $limit ) : object
$limit mixed
return object Cursor

next() public method

public next ( )

rewind() public method

Iterator implementation
public rewind ( )

skip() public method

Set skip
public skip ( mixed $skip ) : object
$skip mixed
return object Cursor

sort() public method

Set sort
public sort ( mixed $sorts ) : object
$sorts mixed
return object Cursor

toArray() public method

Get documents matching criteria
public toArray ( ) : array
return array

valid() public method

public valid ( )

Property Details

$collection protected_oe property

object
protected $collection

$criteria protected_oe property

protected string|null $criteria
return string | null

$data protected_oe property

protected array $data
return array

$limit protected_oe property

protected null|int $limit
return null | integer

$position protected_oe property

protected bool|int $position
return boolean | integer

$projection protected_oe property

protected array|null $projection
return array | null

$skip protected_oe property

protected null|int $skip
return null | integer

$sort protected_oe property

protected null|array $sort
return null | array