class UuidGenerator implements Generator (View source)

Represents an ID generator that uses the database UUID expression

Methods

string|int
generate(EntityManagerInterface $em, object|null $entity)

Generates an identifier for an entity.

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.

Details

string|int generate(EntityManagerInterface $em, object|null $entity)

Generates an identifier for an entity.

Parameters

EntityManagerInterface $em
object|null $entity

Return Value

string|int

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.