PHP Class Mongolid\Util\SequenceService

Afficher le fichier Open project: leroy-merlin-br/mongolid

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__construct ( Pool $connPool, string $collection = 'mongolid_sequences' )
getNextValue ( string $sequenceName ) : integer Get next value for the sequence.

Méthodes protégées

Méthode Description
rawCollection ( ) : MongoDB\Collection Get the actual MongoDB Collection object.

Method Details

__construct() public méthode

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() public méthode

Get next value for the sequence.
public getNextValue ( string $sequenceName ) : integer
$sequenceName string Sequence identifier string.
Résultat integer

rawCollection() protected méthode

Get the actual MongoDB Collection object.
protected rawCollection ( ) : MongoDB\Collection
Résultat MongoDB\Collection

Property Details

$collection protected_oe property

Sequences collection name on MongoDB. Default 'mongolid_sequences'.
protected string $collection
Résultat string

$connPool protected_oe property

Connections that are going to be used to interact with the database.
protected Pool,Mongolid\Connection $connPool
Résultat Mongolid\Connection\Pool