interface ClassMetadataFactory (View source)

Contract for a Doctrine persistence layer ClassMetadata class to implement.

Methods

array
getAllMetadata()

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

ClassMetadata
getMetadataFor(string $className)

Gets the class metadata descriptor for a class.

boolean
hasMetadataFor(string $className)

Checks whether the factory has the metadata for a class loaded already.

setMetadataFor(string $className, ClassMetadata $class)

Sets the metadata descriptor for a specific class.

Details

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

boolean hasMetadataFor(string $className)

Checks whether the factory has the metadata for a class loaded already.

Parameters

string $className

Return Value

boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise.

setMetadataFor(string $className, ClassMetadata $class)

Sets the metadata descriptor for a specific class.

Parameters

string $className
ClassMetadata $class