class ClassMetadataFactory extends AbstractClassMetadataFactory (View source)

The ClassMetadataFactory is used to create ClassMetadata objects that contain all the metadata mapping informations of a class which describes how a class should be mapped to a document database.

Properties

protected string $cacheSalt

Methods

setDocumentManager(DocumentManager $dm)

Sets the DocumentManager instance for this class.

setConfiguration(Configuration $config)

Sets the Configuration instance

initialize()

Lazy initialization of this stuff, especially the metadata driver, since these are not needed at all when a metadata cache is active.

getFqcnFromAlias($namespaceAlias, $simpleClassName)

{@inheritDoc}

getDriver()

{@inheritDoc}

wakeupReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritDoc}

initializeReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritDoc}

isEntity(ClassMetadata $class)

{@inheritDoc}

doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents = [])

{@inheritDoc}

validateIdentifier(ClassMetadata $class)

Validates the identifier mapping.

newClassMetadataInstance(string $className)

Creates a new ClassMetadata instance for the given class name.

Details

setDocumentManager(DocumentManager $dm)

Sets the DocumentManager instance for this class.

Parameters

DocumentManager $dm The DocumentManager instance

setConfiguration(Configuration $config)

Sets the Configuration instance

Parameters

Configuration $config

protected initialize()

Lazy initialization of this stuff, especially the metadata driver, since these are not needed at all when a metadata cache is active.

protected getFqcnFromAlias($namespaceAlias, $simpleClassName)

{@inheritDoc}

Parameters

$namespaceAlias
$simpleClassName

protected getDriver()

{@inheritDoc}

protected wakeupReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritDoc}

Parameters

ClassMetadata $class
ReflectionService $reflService

protected initializeReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritDoc}

Parameters

ClassMetadata $class
ReflectionService $reflService

protected isEntity(ClassMetadata $class)

{@inheritDoc}

Parameters

ClassMetadata $class

protected doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents = [])

{@inheritDoc}

Parameters

$class
$parent
$rootEntityFound
array $nonSuperclassParents

protected validateIdentifier(ClassMetadata $class)

Validates the identifier mapping.

Parameters

ClassMetadata $class

Exceptions

MappingException

protected ClassMetadata newClassMetadataInstance(string $className)

Creates a new ClassMetadata instance for the given class name.

Parameters

string $className

Return Value

ClassMetadata