interface ClassMetadataInterface

Stores metadata needed for serializing and deserializing objects of specific class.

Primarily, the metadata stores the set of attributes to serialize or deserialize.

There may only exist one metadata for each attribute according to its name.

Methods

string
getName()

Returns the name of the backing PHP class.

void
addAttributeMetadata(AttributeMetadataInterface$attributeMetadata)

Adds an {@link AttributeMetadataInterface}.

array
getAttributesMetadata()

Gets the list of {@link AttributeMetadataInterface}.

void
merge(ClassMetadataInterface$classMetadata)

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

getReflectionClass()

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

ClassDiscriminatorMapping|null
getClassDiscriminatorMapping()

No description

void
setClassDiscriminatorMapping(ClassDiscriminatorMapping|null$mapping)

No description

Details

string getName()

Returns the name of the backing PHP class.

Return Value

string

void addAttributeMetadata(AttributeMetadataInterface$attributeMetadata)

Adds an {@link AttributeMetadataInterface}.

Parameters

AttributeMetadataInterface $attributeMetadata

Return Value

void

array getAttributesMetadata()

Gets the list of {@link AttributeMetadataInterface}.

Return Value

array AttributeMetadataInterface>

void merge(ClassMetadataInterface$classMetadata)

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

Parameters

ClassMetadataInterface $classMetadata

Return Value

void

ReflectionClass getReflectionClass()

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

Return Value

ReflectionClass

ClassDiscriminatorMapping|null getClassDiscriminatorMapping()

Return Value

ClassDiscriminatorMapping|null

void setClassDiscriminatorMapping(ClassDiscriminatorMapping|null$mapping)

Parameters

ClassDiscriminatorMapping|null $mapping

Return Value

void