PHP Класс Mongolid\Cursor\CacheableCursor

Наследование: extends Cursor
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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