class AssignedGenerator extends AbstractIdGenerator (View source)

Special generator for application-assigned identifiers (doesn't really generate anything).

Methods

mixed
generate(EntityManager $em, Entity $entity)

Returns the identifier assigned to the given 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.

Details

mixed generate(EntityManager $em, Entity $entity)

Returns the identifier assigned to the given entity.

Parameters

EntityManager $em
Entity $entity

Return Value

mixed

Exceptions

ORMException

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