Class yii\mongodb\file\Cursor
Inheritance | yii\mongodb\file\Cursor » IteratorIterator |
---|---|
Implements | Countable |
Available since version | 2.1 |
Cursor is a wrapper around \MongoDB\Driver\Cursor, which allows returning of the record with yii\mongodb\file\Download instance attached.
Public Properties
隐藏继承的属性 Hide inherited properties
属性Property | 类型 Type | 简介 Description | 定义在 Defined By |
---|---|---|---|
$collection | yii\mongodb\file\Collection | Related GridFS collection instance. | yii\mongodb\file\Cursor |
Public Methods
隐藏继承的方法 Hide inherited methods
方法 Method | 简介 Description | 定义在 Defined By |
---|---|---|
__call() | PHP magic method, which is invoked on attempt of invocation not existing method. | yii\mongodb\file\Cursor |
__construct() | Constructor. | yii\mongodb\file\Cursor |
__get() | PHP magic method, which is invoked on attempt of getting not existing property. | yii\mongodb\file\Cursor |
__isset() | PHP magic method, which is invoked on attempt of checking if a property is set. | yii\mongodb\file\Cursor |
__set() | PHP magic method, which is invoked on attempt of setting not existing property. | yii\mongodb\file\Cursor |
__unset() | PHP magic method, which is invoked on attempt of unsetting of property. | yii\mongodb\file\Cursor |
count() | Count elements of this cursor. | yii\mongodb\file\Cursor |
current() | Return the current element This method is required by the interface Iterator. | yii\mongodb\file\Cursor |
getId() | Returns the ID for this cursor. | yii\mongodb\file\Cursor |
setTypeMap() | Sets a type map to use for BSON unserialization. | yii\mongodb\file\Cursor |
toArray() | Returns an array containing all results for this cursor | yii\mongodb\file\Cursor |
属性详情 Property Details
Related GridFS collection instance.
方法详情 Method Details
PHP magic method, which is invoked on attempt of invocation not existing method.
It redirects method call to inner iterator.
public mixed __call ( $name, $arguments ) | ||
$name | string | Method name. |
$arguments | array | Method arguments |
return | mixed | Method result. |
---|
Constructor.
public void __construct ( $collection, $cursor ) | ||
$collection | yii\mongodb\file\Collection | |
$cursor | \MongoDB\Driver\Cursor |
PHP magic method, which is invoked on attempt of getting not existing property.
It returns value from the inner iterator.
public mixed __get ( $name ) | ||
$name | string | Field name. |
return | mixed | Field value. |
---|
PHP magic method, which is invoked on attempt of checking if a property is set.
public boolean __isset ( $name ) | ||
$name | string | Field name. |
return | boolean | Whether field exists or not. |
---|
PHP magic method, which is invoked on attempt of setting not existing property.
It passes value to the inner iterator.
public void __set ( $name, $value ) | ||
$name | string | Field name. |
$value | mixed | Field value. |
PHP magic method, which is invoked on attempt of unsetting of property.
public void __unset ( $name ) | ||
$name | string | Field name. |
Count elements of this cursor.
This method is required by the interface Countable.
public integer count ( ) | ||
return | integer | Elements count. |
---|
Return the current element This method is required by the interface Iterator.
public mixed current ( ) | ||
return | mixed | Current row |
---|
Returns the ID for this cursor.
public \MongoDB\Driver\CursorId getId ( ) | ||
return | \MongoDB\Driver\CursorId | Cursor ID. |
---|
Sets a type map to use for BSON unserialization.
public void setTypeMap ( $typemap ) | ||
$typemap | array | Type map. |
Returns an array containing all results for this cursor
public array toArray ( ) | ||
return | array | Containing all results for this cursor. |
---|