AbstractIdGenerator
in package
AbstractYes
Table of Contents
Properties
Methods
- generate() : mixed
- Generates an identifier for an entity.
- generateId() : mixed
- Generates an identifier for an entity.
- isPostInsertGenerator() : bool
- Gets whether this generator is a post-insert generator which means that {@link generateId()} must be called after the entity has been inserted into the database.
Properties
$alreadyDelegatedToGenerateId
private
bool
$alreadyDelegatedToGenerateId
= false
Methods
generate()
Generates an identifier for an entity.
public
generate(EntityManager $em, object|null $entity) : mixed
Parameters
- $em : EntityManager
- $entity : object|null
Tags
generateId()
Generates an identifier for an entity.
public
generateId(EntityManagerInterface $em, object|null $entity) : mixed
Parameters
- $em : EntityManagerInterface
- $entity : object|null
isPostInsertGenerator()
Gets whether this generator is a post-insert generator which means that {@link generateId()} must be called after the entity has been inserted into the database.
public
isPostInsertGenerator() : bool
By default, this method returns FALSE. Generators that have this requirement must override this method and return TRUE.