PHP 클래스 Alcaeus\MongoDbAdapter\AbstractCursor

상속: use trait Alcaeus\MongoDbAdapter\Helper\ReadPreference
파일 보기 프로젝트 열기: alcaeus/mongo-php-adapter 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$batchSize integer
$collection MongoDB\Collection
$connection MongoClient
$cursor MongoDB\Driver\Cursor
$cursorNeedsAdvancing boolean
$db MongoDB\Database
$iterator Iterator
$ns string
$optionNames array
$position integer
$startedIterating boolean

공개 메소드들

메소드 설명
__construct ( MongoClient $connection, string $ns ) Create a new cursor
__sleep ( ) : array
batchSize ( integer $batchSize ) Limits the number of elements returned in one batch.
current ( ) : array Returns the current element
dead ( ) : boolean Checks if there are documents that have not been sent yet from the database for this cursor
info ( ) : array
key ( ) : string Returns the current result's _id
next ( ) : array Advances the cursor to the next result, and returns that result
rewind ( ) : void Returns the cursor to the beginning of the result set
setReadPreference ( string $readPreference, array $tags = null )
timeout ( integer $ms ) Sets a client-side timeout for this query
valid ( ) : boolean Checks if the cursor is reading a valid result.

보호된 메소드들

메소드 설명
ensureCursor ( ) : MongoDB\Driver\Cursor
ensureIterator ( ) : Iterator
errorIfOpened ( )
getCursorInfo ( ) : array
getIterationInfo ( ) : array
getOptions ( array $optionNames = null ) : array Applies all options set on the cursor, overwriting any options that have already been set
notImplemented ( )
reset ( ) Clears the cursor
storeIteratorState ( ) Stores the current cursor element.
wrapTraversable ( Traversable $traversable ) : Generator

메소드 상세

__construct() 공개 메소드

Create a new cursor
public __construct ( MongoClient $connection, string $ns )
$connection MongoClient Database connection.
$ns string Full name of database and collection.

__sleep() 공개 메소드

public __sleep ( ) : array
리턴 array

batchSize() 공개 메소드

Limits the number of elements returned in one batch.
public batchSize ( integer $batchSize )
$batchSize integer The number of results to return per batch

current() 공개 메소드

Returns the current element
public current ( ) : array
리턴 array

dead() 공개 메소드

Checks if there are documents that have not been sent yet from the database for this cursor
public dead ( ) : boolean
리턴 boolean Returns if there are more results that have not been sent to the client, yet.

ensureCursor() 추상적인 보호된 메소드

abstract protected ensureCursor ( ) : MongoDB\Driver\Cursor
리턴 MongoDB\Driver\Cursor

ensureIterator() 보호된 메소드

protected ensureIterator ( ) : Iterator
리턴 Iterator

errorIfOpened() 보호된 메소드

protected errorIfOpened ( )

getCursorInfo() 추상적인 보호된 메소드

abstract protected getCursorInfo ( ) : array
리턴 array

getIterationInfo() 보호된 메소드

protected getIterationInfo ( ) : array
리턴 array

getOptions() 보호된 메소드

Applies all options set on the cursor, overwriting any options that have already been set
protected getOptions ( array $optionNames = null ) : array
$optionNames array Array of option names to be applied (will be read from properties)
리턴 array

info() 공개 메소드

public info ( ) : array
리턴 array

key() 공개 메소드

Returns the current result's _id
public key ( ) : string
리턴 string The current result's _id as a string.

next() 공개 메소드

Advances the cursor to the next result, and returns that result
public next ( ) : array
리턴 array Returns the next object

notImplemented() 보호된 메소드

protected notImplemented ( )

reset() 보호된 메소드

This is generic but implemented as protected since it's only exposed in MongoCursor
protected reset ( )

rewind() 공개 메소드

Returns the cursor to the beginning of the result set
public rewind ( ) : void
리턴 void

setReadPreference() 공개 메소드

public setReadPreference ( string $readPreference, array $tags = null )
$readPreference string
$tags array

storeIteratorState() 보호된 메소드

This is necessary because hasNext() might advance the iterator but we still need to be able to return the current object.
protected storeIteratorState ( )

timeout() 공개 메소드

Sets a client-side timeout for this query
public timeout ( integer $ms )
$ms integer The number of milliseconds for the cursor to wait for a response. By default, the cursor will wait forever.

valid() 공개 메소드

Checks if the cursor is reading a valid result.
public valid ( ) : boolean
리턴 boolean If the current result is not null.

wrapTraversable() 보호된 메소드

protected wrapTraversable ( Traversable $traversable ) : Generator
$traversable Traversable
리턴 Generator

프로퍼티 상세

$batchSize 보호되어 있는 프로퍼티

protected int $batchSize
리턴 integer

$collection 보호되어 있는 프로퍼티

protected Collection,MongoDB $collection
리턴 MongoDB\Collection

$connection 보호되어 있는 프로퍼티

protected MongoClient $connection
리턴 MongoClient

$cursor 보호되어 있는 프로퍼티

protected Cursor,MongoDB\Driver $cursor
리턴 MongoDB\Driver\Cursor

$cursorNeedsAdvancing 보호되어 있는 프로퍼티

protected bool $cursorNeedsAdvancing
리턴 boolean

$db 보호되어 있는 프로퍼티

protected Database,MongoDB $db
리턴 MongoDB\Database

$iterator 보호되어 있는 프로퍼티

protected Iterator $iterator
리턴 Iterator

$ns 보호되어 있는 프로퍼티

protected string $ns
리턴 string

$optionNames 보호되어 있는 프로퍼티

protected array $optionNames
리턴 array

$position 보호되어 있는 프로퍼티

protected int $position
리턴 integer

$startedIterating 보호되어 있는 프로퍼티

protected bool $startedIterating
리턴 boolean