UuidGenerator
extends AbstractIdGenerator
in package
FinalYes
Table of Contents
Properties
- $alreadyDelegatedToGenerateId : bool
- $entityGetter : string|null
- $factory : mixed
- $protoFactory : mixed
Methods
- __construct() : mixed
- generate() : mixed
- doctrine/orm < 2.11 BC layer.
- 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.
- nameBased() : static
- randomBased() : static
- timeBased() : static
Properties
$alreadyDelegatedToGenerateId
private
bool
$alreadyDelegatedToGenerateId
= false
$entityGetter
private
string|null
$entityGetter
= null
$factory
private
mixed
$factory
$protoFactory
private
mixed
$protoFactory
Methods
__construct()
public
__construct([UuidFactory $factory = null ]) : mixed
Parameters
- $factory : UuidFactory = null
generate()
doctrine/orm < 2.11 BC layer.
public
generate(EntityManager $em, mixed $entity) : mixed
Parameters
- $em : EntityManager
- $entity : mixed
generateId()
Generates an identifier for an entity.
public
generateId(EntityManagerInterface $em, mixed $entity) : mixed
Parameters
- $em : EntityManagerInterface
- $entity : mixed
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.
Return values
boolnameBased()
public
nameBased(string $entityGetter[, Uuid|string $namespace = null ]) : static
Parameters
- $entityGetter : string
- $namespace : Uuid|string = null
Return values
staticrandomBased()
public
randomBased() : static
Return values
statictimeBased()
public
timeBased([Uuid|string $node = null ]) : static
Parameters
- $node : Uuid|string = null