class ClassMetadata implements ClassMetadataInterface

{@inheritdoc}

Properties

$name
AttributeMetadataInterface[] $attributesMetadata
ClassDiscriminatorMapping|null $classDiscriminatorMapping

Methods

__construct(string $class, ClassDiscriminatorMapping $classDiscriminatorMapping = null)

Constructs a metadata for the given class.

string
getName()

Returns the name of the backing PHP class.

addAttributeMetadata(AttributeMetadataInterface $attributeMetadata)

Adds an {@link AttributeMetadataInterface}.

getAttributesMetadata()

Gets the list of {@link AttributeMetadataInterface}.

merge(ClassMetadataInterface $classMetadata)

Merges a {@link ClassMetadataInterface} in the current one.

getReflectionClass()

Returns a {@link \ReflectionClass} instance for this class.

string[]
__sleep()

Returns the names of the properties that should be serialized.

Details

at line 57
__construct(string $class, ClassDiscriminatorMapping $classDiscriminatorMapping = null)

Constructs a metadata for the given class.

Parameters

string $class
ClassDiscriminatorMapping $classDiscriminatorMapping

at line 66
string getName()

Returns the name of the backing PHP class.

Return Value

string The name of the backing class

at line 74
addAttributeMetadata(AttributeMetadataInterface $attributeMetadata)

Adds an {@link AttributeMetadataInterface}.

Parameters

AttributeMetadataInterface $attributeMetadata

at line 82
AttributeMetadataInterface[] getAttributesMetadata()

Gets the list of {@link AttributeMetadataInterface}.

at line 90
merge(ClassMetadataInterface $classMetadata)

Merges a {@link ClassMetadataInterface} in the current one.

Parameters

ClassMetadataInterface $classMetadata

at line 104
ReflectionClass getReflectionClass()

Returns a {@link \ReflectionClass} instance for this class.

Return Value

ReflectionClass

at line 116
ClassDiscriminatorMapping|null getClassDiscriminatorMapping()

Return Value

ClassDiscriminatorMapping|null

at line 124
setClassDiscriminatorMapping(ClassDiscriminatorMapping $mapping = null)

Parameters

ClassDiscriminatorMapping $mapping

at line 134
string[] __sleep()

Returns the names of the properties that should be serialized.

Return Value

string[]