class AssignedIdGenerator extends IdGenerator (View source)

Generator to handle explicitly assigned repository paths.

Methods

static IdGenerator
create(int $generatorType)

Factory method for the predefined strategies.

string
generate(object $document, ClassMetadata $cm, DocumentManagerInterface $dm, object $parent = null)

Use the identifier field as id and throw exception if not set.

Details

static IdGenerator create(int $generatorType)

Factory method for the predefined strategies.

Parameters

int $generatorType

Return Value

IdGenerator

string generate(object $document, ClassMetadata $cm, DocumentManagerInterface $dm, object $parent = null)

Use the identifier field as id and throw exception if not set.

{@inheritdoc}

Parameters

object $document the object to create the id for
ClassMetadata $cm
DocumentManagerInterface $dm
object $parent

Return Value

string the id for this document