class ClassMetadataFactory extends AbstractClassMetadataFactory (View source)

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

Methods

__construct(DocumentManager $dm)

Creates a new factory instance that uses the given DocumentManager instance.

doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents)

{@inheritdoc}

getFqcnFromAlias($namespaceAlias, $simpleClassName)

{@inheritdoc}

array
getAllMetadata()

Forces the factory to load the metadata of all classes known to the underlying mapping driver.

getMetadataFor(string $className)

Gets the class metadata descriptor for a class.

array
loadMetadata(string $className)

Loads the metadata of the class in question and all it's ancestors whose metadata is still not loaded.

newClassMetadataInstance(string $className)

Creates a new ClassMetadata instance for the given class name.

getDriver()

{@inheritdoc}

initialize()

{@inheritdoc}

initializeReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritdoc}

wakeupReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritdoc}

isEntity(ClassMetadata $class)

{@inheritDoc}

Details

__construct(DocumentManager $dm)

Creates a new factory instance that uses the given DocumentManager instance.

Parameters

DocumentManager $dm The DocumentManager instance

Exceptions

RuntimeException

protected doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents)

{@inheritdoc}

Parameters

$class
$parent
$rootEntityFound
array $nonSuperclassParents

protected getFqcnFromAlias($namespaceAlias, $simpleClassName)

{@inheritdoc}

Parameters

$namespaceAlias
$simpleClassName

array getAllMetadata()

Forces the factory to load the metadata of all classes known to the underlying mapping driver.

Return Value

array The ClassMetadata instances of all mapped classes.

ClassMetadata getMetadataFor(string $className)

Gets the class metadata descriptor for a class.

Parameters

string $className The name of the class.

Return Value

ClassMetadata

Exceptions

MappingException

protected array loadMetadata(string $className)

Loads the metadata of the class in question and all it's ancestors whose metadata is still not loaded.

Parameters

string $className The name of the class for which the metadata should get loaded.

Return Value

array

Exceptions

MappingException

protected ClassMetadata newClassMetadataInstance(string $className)

Creates a new ClassMetadata instance for the given class name.

Parameters

string $className

Return Value

ClassMetadata

protected getDriver()

{@inheritdoc}

protected initialize()

{@inheritdoc}

protected initializeReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritdoc}

Parameters

ClassMetadata $class
ReflectionService $reflService

protected wakeupReflection(ClassMetadata $class, ReflectionService $reflService)

{@inheritdoc}

Parameters

ClassMetadata $class
ReflectionService $reflService

protected isEntity(ClassMetadata $class)

{@inheritDoc}

Parameters

ClassMetadata $class