PHP Class yii\mongodb\file\Cursor

Since: 2.1
Author: Paul Klimov ([email protected])
Inheritance: extends IteratorIterator, implements Countable
Datei anzeigen Open project: yiisoft/yii2-mongodb

Public Properties

Property Type Description
$collection related GridFS collection instance.

Public Methods

Method Description
__call ( string $name, array $arguments ) : mixed PHP magic method, which is invoked on attempt of invocation not existing method.
__construct ( Collection $collection, MongoDB\Driver\Cursor $cursor ) Constructor.
__get ( string $name ) : mixed PHP magic method, which is invoked on attempt of getting not existing property.
__isset ( string $name ) : boolean PHP magic method, which is invoked on attempt of checking if a property is set.
__set ( string $name, mixed $value ) PHP magic method, which is invoked on attempt of setting not existing property.
__unset ( string $name ) PHP magic method, which is invoked on attempt of unsetting of property.
count ( ) : integer Count elements of this cursor.
current ( ) : mixed Return the current element This method is required by the interface [[\Iterator]].
getId ( ) : MongoDB\Driver\CursorId Returns the ID for this cursor.
setTypeMap ( array $typemap ) Sets a type map to use for BSON unserialization.
toArray ( ) : array Returns an array containing all results for this cursor

Method Details

__call() public method

It redirects method call to inner iterator.
public __call ( string $name, array $arguments ) : mixed
$name string method name.
$arguments array method arguments
return mixed method result.

__construct() public method

Constructor.
public __construct ( Collection $collection, MongoDB\Driver\Cursor $cursor )
$collection Collection
$cursor MongoDB\Driver\Cursor

__get() public method

It returns value from the inner iterator.
public __get ( string $name ) : mixed
$name string field name.
return mixed field value.

__isset() public method

PHP magic method, which is invoked on attempt of checking if a property is set.
public __isset ( string $name ) : boolean
$name string field name.
return boolean whether field exists or not.

__set() public method

It passes value to the inner iterator.
public __set ( string $name, mixed $value )
$name string field name.
$value mixed field value.

__unset() public method

PHP magic method, which is invoked on attempt of unsetting of property.
public __unset ( string $name )
$name string field name.

count() public method

This method is required by the interface [[\Countable]].
public count ( ) : integer
return integer elements count.

current() public method

Return the current element This method is required by the interface [[\Iterator]].
public current ( ) : mixed
return mixed current row

getId() public method

Returns the ID for this cursor.
public getId ( ) : MongoDB\Driver\CursorId
return MongoDB\Driver\CursorId cursor ID.

setTypeMap() public method

Sets a type map to use for BSON unserialization.
public setTypeMap ( array $typemap )
$typemap array type map.

toArray() public method

Returns an array containing all results for this cursor
public toArray ( ) : array
return array containing all results for this cursor.

Property Details

$collection public_oe property

related GridFS collection instance.
public $collection