class RepositoryIdGenerator extends IdGenerator (View source)

Methods

static IdGenerator
create(int $generatorType)

Factory method for the predefined strategies.

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

Use a repository that implements RepositoryIdGenerator to generate the id.

Details

static IdGenerator create(int $generatorType)

Factory method for the predefined strategies.

Parameters

int $generatorType

Return Value

IdGenerator

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

Use a repository that implements RepositoryIdGenerator to generate the id.

{@inheritdoc}

Parameters

object $document the object to create the id for
ClassMetadata $class class metadata of this object
DocumentManagerInterface $dm
object $parent

Return Value

string the id for this document