PHP Класс Mongolid\Util\SequenceService

Показать файл Открыть проект

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

Свойство Тип Описание
$collection string Sequences collection name on MongoDB. Default 'mongolid_sequences'.
$connPool Mongolid\Connection\Pool Connections that are going to be used to interact with the database.

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

Метод Описание
__construct ( Pool $connPool, string $collection = 'mongolid_sequences' )
getNextValue ( string $sequenceName ) : integer Get next value for the sequence.

Защищенные методы

Метод Описание
rawCollection ( ) : MongoDB\Collection Get the actual MongoDB Collection object.

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

__construct() публичный Метод

public __construct ( Pool $connPool, string $collection = 'mongolid_sequences' )
$connPool Mongolid\Connection\Pool The connections that are going to be used to interact with the database.
$collection string The collection where the sequences will be stored.

getNextValue() публичный Метод

Get next value for the sequence.
public getNextValue ( string $sequenceName ) : integer
$sequenceName string Sequence identifier string.
Результат integer

rawCollection() защищенный Метод

Get the actual MongoDB Collection object.
protected rawCollection ( ) : MongoDB\Collection
Результат MongoDB\Collection

Описание свойств

$collection защищенное свойство

Sequences collection name on MongoDB. Default 'mongolid_sequences'.
protected string $collection
Результат string

$connPool защищенное свойство

Connections that are going to be used to interact with the database.
protected Pool,Mongolid\Connection $connPool
Результат Mongolid\Connection\Pool