PHP 클래스 Mongolid\Cursor\CacheableCursor

상속: extends Cursor
파일 보기 프로젝트 열기: leroy-merlin-br/mongolid

보호된 프로퍼티들

프로퍼티 타입 설명
$documents array The documents that were retrieved from the database in a serializable way.
$ignoreCache boolean Means that the CacheableCursor is wapping the original cursor and not reading from Cache anymore.
$originalLimit ìnteger Limit of the query. It is stored because when caching the documents the DOCUMENT_LIMIT const will be used.

공개 메소드들

메소드 설명
serialize ( ) : string Serializes this object. Drops the unserializable DriverCursor. In order to make the CacheableCursor object serializable.

보호된 메소드들

메소드 설명
generateCacheKey ( ) : string Generates an unique cache key for the cursor in it's current state.
getCursor ( ) : Traversable Actually returns a Traversable object with the DriverCursor within.
getLimit ( ) : mixed Gets the limit clause of the query if any.
getOriginalCursor ( ) : Traversable Returns the DriverCursor considering the documents that have already been retrieved from cache.
storeOriginalLimit ( ) : void Stores the original "limit" clause of the query.

메소드 상세

generateCacheKey() 보호된 메소드

Generates an unique cache key for the cursor in it's current state.
protected generateCacheKey ( ) : string
리턴 string Cache key to identify the query of the current cursor.

getCursor() 보호된 메소드

If it does not exists yet, create it using the $collection, $command and $params given. The difference between the CacheableCursor and the normal Cursor is that the Cacheable stores all the results within itself and drops the Driver Cursor in order to be serializable.
protected getCursor ( ) : Traversable
리턴 Traversable

getLimit() 보호된 메소드

Gets the limit clause of the query if any.
protected getLimit ( ) : mixed
리턴 mixed Int or null

getOriginalCursor() 보호된 메소드

Returns the DriverCursor considering the documents that have already been retrieved from cache.
protected getOriginalCursor ( ) : Traversable
리턴 Traversable

serialize() 공개 메소드

Serializes this object. Drops the unserializable DriverCursor. In order to make the CacheableCursor object serializable.
public serialize ( ) : string
리턴 string Serialized object.

storeOriginalLimit() 보호된 메소드

Stores the original "limit" clause of the query.
protected storeOriginalLimit ( ) : void
리턴 void

프로퍼티 상세

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

The documents that were retrieved from the database in a serializable way.
protected array $documents
리턴 array

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

Means that the CacheableCursor is wapping the original cursor and not reading from Cache anymore.
protected bool $ignoreCache
리턴 boolean

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

Limit of the query. It is stored because when caching the documents the DOCUMENT_LIMIT const will be used.
protected ìnteger $originalLimit
리턴 ìnteger