class TableGenerator extends AbstractIdGenerator (View source)

Id generator that uses a single-row database table and a hi/lo algorithm.

Methods

mixed
generate(EntityManager $em, object|null $entity)

Generates an identifier for an entity.

boolean
isPostInsertGenerator()

Gets whether this generator is a post-insert generator which means that {@link generate()} must be called after the entity has been inserted into the database.

__construct(string $tableName, string $sequenceName = 'default', int $allocationSize = 10)

No description

Details

mixed generate(EntityManager $em, object|null $entity)

Generates an identifier for an entity.

Parameters

EntityManager $em
object|null $entity

Return Value

mixed

boolean isPostInsertGenerator()

Gets whether this generator is a post-insert generator which means that {@link generate()} must be called after the entity has been inserted into the database.

By default, this method returns FALSE. Generators that have this requirement must override this method and return TRUE.

Return Value

boolean

__construct(string $tableName, string $sequenceName = 'default', int $allocationSize = 10)

Parameters

string $tableName
string $sequenceName
int $allocationSize