PHP Класс Mongolid\Cursor\CursorFactory

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
createCursor ( Schema $entitySchema, MongoDB\Collection $collection, string $command, array $params, boolean $cacheable = false ) : Cursor Creates a new instance of a non embedded Cursor.
createEmbeddedCursor ( string $entityClass, array $items ) : Mongolid\Cursor\CursorInterface Creates a new instance of EmbeddedCursor.

Описание методов

createCursor() публичный метод

Creates a new instance of a non embedded Cursor.
public createCursor ( Schema $entitySchema, MongoDB\Collection $collection, string $command, array $params, boolean $cacheable = false ) : Cursor
$entitySchema Mongolid\Schema\Schema Schema that describes the entity that will be retrieved from the database.
$collection MongoDB\Collection The raw collection object that will be used to retrieve the documents.
$command string The command that is being called in the $collection.
$params array The parameters of the $command.
$cacheable boolean Retrieves a CacheableCursor instead.
Результат Cursor

createEmbeddedCursor() публичный метод

Creates a new instance of EmbeddedCursor.
public createEmbeddedCursor ( string $entityClass, array $items ) : Mongolid\Cursor\CursorInterface
$entityClass string Class of the objects that will be retrieved by the cursor.
$items array The items array.
Результат Mongolid\Cursor\CursorInterface