PHP Class PHPDaemon\Clients\Mongo\Cursor

Author: Vasily Zorin ([email protected])
Inheritance: implements Iterator, use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Exibir arquivo Open project: kakserpom/phpdaemon

Public Properties

Property Type Description
$await awaitCapable?
$callback callable
$col Collection's name
$counter
$destroyed Is this cursor destroyed?
$failure Is this query failured?
$finished Is this cursor finished?
$id Cursor's ID
$item Current object
$items Array of objects
$parseOplog boolean
$tailable boolean

Protected Properties

Property Type Description
$conn Network connection
$keep
$pos

Public Methods

Method Description
__construct ( string $id, string $col, Connection $conn ) : void Constructor
__destruct ( ) : void Cursor's destructor. Sends a signal to the server
current ( ) : mixed Current
destroy ( boolean $notify = false ) : boolean Destroys the cursors
error ( ) : mixed Error
free ( boolean $notify = false ) : boolean Destroys the cursors
getConn ( ) : Connection
getMore ( integer $number ) : void Asks for more objects
grab ( ) : array Grab
isBusyConn ( ) : boolean
isDead ( ) : boolean isDead
isFinished ( ) : boolean
keep ( boolean $bool = true ) : void Keep
key ( ) : string Key
next ( ) : void Next
rewind ( ) : void Rewind
toArray ( ) : array To array
valid ( ) : boolean Valid

Method Details

__construct() public method

Constructor
public __construct ( string $id, string $col, Connection $conn ) : void
$id string Cursor's ID
$col string Collection's name
$conn Connection Network connection (MongoClientConnection)
return void

__destruct() public method

Cursor's destructor. Sends a signal to the server
public __destruct ( ) : void
return void

current() public method

Current
public current ( ) : mixed
return mixed

destroy() public method

Destroys the cursors
public destroy ( boolean $notify = false ) : boolean
$notify boolean
return boolean Success

error() public method

Error
public error ( ) : mixed
return mixed

free() public method

Destroys the cursors
public free ( boolean $notify = false ) : boolean
$notify boolean
return boolean Success

getConn() public method

public getConn ( ) : Connection
return Connection

getMore() public method

Asks for more objects
public getMore ( integer $number ) : void
$number integer Number of objects
return void

grab() public method

Grab
public grab ( ) : array
return array

isBusyConn() public method

public isBusyConn ( ) : boolean
return boolean

isDead() public method

isDead
public isDead ( ) : boolean
return boolean

isFinished() public method

public isFinished ( ) : boolean
return boolean

keep() public method

Keep
public keep ( boolean $bool = true ) : void
$bool boolean
return void

key() public method

Key
public key ( ) : string
return string

next() public method

Next
public next ( ) : void
return void

rewind() public method

Rewind
public rewind ( ) : void
return void

toArray() public method

To array
public toArray ( ) : array
return array

valid() public method

Valid
public valid ( ) : boolean
return boolean

Property Details

$await public_oe property

awaitCapable?
public $await

$callback public_oe property

public callable $callback
return callable

$col public_oe property

Collection's name
public $col

$conn protected_oe property

Network connection
protected $conn

$counter public_oe property

public $counter

$destroyed public_oe property

Is this cursor destroyed?
public $destroyed

$failure public_oe property

Is this query failured?
public $failure

$finished public_oe property

Is this cursor finished?
public $finished

$id public_oe property

Cursor's ID
public $id

$item public_oe property

Current object
public $item

$items public_oe property

Array of objects
public $items

$keep protected_oe property

protected $keep

$parseOplog public_oe property

public bool $parseOplog
return boolean

$pos protected_oe property

protected $pos

$tailable public_oe property

public bool $tailable
return boolean