interface ClassMetadata (View source)

Contract for a Doctrine persistence layer ClassMetadata class to implement.

Methods

string
getName()

Get fully-qualified class name of this persistent class.

array
getIdentifier()

Gets the mapped identifier field name.

ReflectionClass
getReflectionClass()

Gets the ReflectionClass instance for this mapped class.

boolean
isIdentifier(string $fieldName)

Checks if the given field name is a mapped identifier for this class.

boolean
hasField(string $fieldName)

Checks if the given field is a mapped property for this class.

boolean
hasAssociation(string $fieldName)

Checks if the given field is a mapped association for this class.

boolean
isSingleValuedAssociation(string $fieldName)

Checks if the given field is a mapped single valued association for this class.

boolean
isCollectionValuedAssociation(string $fieldName)

Checks if the given field is a mapped collection valued association for this class.

array
getFieldNames()

A numerically indexed list of field names of this persistent class.

array
getAssociationNames()

A numerically indexed list of association names of this persistent class.

string
getTypeOfField(string $fieldName)

Returns a type name of this field.

string
getAssociationTargetClass(string $assocName)

Returns the target class name of the given association.

Details

string getName()

Get fully-qualified class name of this persistent class.

Return Value

string

array getIdentifier()

Gets the mapped identifier field name.

The returned structure is an array of the identifier field names.

Return Value

array

ReflectionClass getReflectionClass()

Gets the ReflectionClass instance for this mapped class.

Return Value

ReflectionClass

boolean isIdentifier(string $fieldName)

Checks if the given field name is a mapped identifier for this class.

Parameters

string $fieldName

Return Value

boolean

boolean hasField(string $fieldName)

Checks if the given field is a mapped property for this class.

Parameters

string $fieldName

Return Value

boolean

boolean hasAssociation(string $fieldName)

Checks if the given field is a mapped association for this class.

Parameters

string $fieldName

Return Value

boolean

boolean isSingleValuedAssociation(string $fieldName)

Checks if the given field is a mapped single valued association for this class.

Parameters

string $fieldName

Return Value

boolean

boolean isCollectionValuedAssociation(string $fieldName)

Checks if the given field is a mapped collection valued association for this class.

Parameters

string $fieldName

Return Value

boolean

array getFieldNames()

A numerically indexed list of field names of this persistent class.

This array includes identifier fields if present on this class.

Return Value

array

array getAssociationNames()

A numerically indexed list of association names of this persistent class.

This array includes identifier associations if present on this class.

Return Value

array

string getTypeOfField(string $fieldName)

Returns a type name of this field.

This type names can be implementation specific but should at least include the php types: integer, string, boolean, float/double, datetime.

Parameters

string $fieldName

Return Value

string

string getAssociationTargetClass(string $assocName)

Returns the target class name of the given association.

Parameters

string $assocName

Return Value

string