class AutoIdGenerator extends ParentIdGenerator (View source)

Generate the id using the auto naming strategy.

Methods

static IdGenerator
create(int $generatorType)

Factory method for the predefined strategies.

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

Use the parent field together with an auto generated name to generate the id.

buildName($document, ClassMetadata $class, DocumentManagerInterface $dm, $parent, $name)

No description

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 the parent field together with an auto generated name 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

protected buildName($document, ClassMetadata $class, DocumentManagerInterface $dm, $parent, $name)

Parameters

$document
ClassMetadata $class
DocumentManagerInterface $dm
$parent
$name