ClassMetadata
in
Contract for a Doctrine persistence layer ClassMetadata class to implement.
Tags
Table of Contents
- getAssociationMappedByTargetField() : string
- Returns the target field of the owning side of the association.
- getAssociationNames() : array<string|int, string>
- Returns a numerically indexed list of association names of this persistent class.
- getAssociationTargetClass() : string|null
- Returns the target class name of the given association.
- getFieldNames() : array<string|int, string>
- A numerically indexed list of field names of this persistent class.
- getIdentifier() : array<string|int, mixed>
- Gets the mapped identifier field name.
- getIdentifierFieldNames() : array<string|int, string>
- Returns an array of identifier field names numerically indexed.
- getIdentifierValues() : array<string|int, mixed>
- Returns the identifier of this object as an array with field name as key.
- getName() : string
- Gets the fully-qualified class name of this persistent class.
- getReflectionClass() : ReflectionClass<string|int, T>
- Gets the ReflectionClass instance for this mapped class.
- getTypeOfField() : string|null
- Returns a type name of this field.
- hasAssociation() : bool
- Checks if the given field is a mapped association for this class.
- hasField() : bool
- Checks if the given field is a mapped property for this class.
- isAssociationInverseSide() : bool
- Checks if the association is the inverse side of a bidirectional association.
- isCollectionValuedAssociation() : bool
- Checks if the given field is a mapped collection valued association for this class.
- isIdentifier() : bool
- Checks if the given field name is a mapped identifier for this class.
- isSingleValuedAssociation() : bool
- Checks if the given field is a mapped single valued association for this class.
Methods
getAssociationMappedByTargetField()
Returns the target field of the owning side of the association.
public
getAssociationMappedByTargetField(string $assocName) : string
Parameters
- $assocName : string
Return values
string —getAssociationNames()
Returns a numerically indexed list of association names of this persistent class.
public
getAssociationNames() : array<string|int, string>
This array includes identifier associations if present on this class.
Return values
array<string|int, string> —getAssociationTargetClass()
Returns the target class name of the given association.
public
getAssociationTargetClass(string $assocName) : string|null
Parameters
- $assocName : string
Tags
Return values
string|null —getFieldNames()
A numerically indexed list of field names of this persistent class.
public
getFieldNames() : array<string|int, string>
This array includes identifier fields if present on this class.
Return values
array<string|int, string> —getIdentifier()
Gets the mapped identifier field name.
public
getIdentifier() : array<string|int, mixed>
The returned structure is an array of the identifier field names.
Return values
array<string|int, mixed> —getIdentifierFieldNames()
Returns an array of identifier field names numerically indexed.
public
getIdentifierFieldNames() : array<string|int, string>
Return values
array<string|int, string> —getIdentifierValues()
Returns the identifier of this object as an array with field name as key.
public
getIdentifierValues(object $object) : array<string|int, mixed>
Has to return an empty array if no identifier isset.
Parameters
- $object : object
Return values
array<string|int, mixed> —getName()
Gets the fully-qualified class name of this persistent class.
public
getName() : string
Tags
Return values
string —getReflectionClass()
Gets the ReflectionClass instance for this mapped class.
public
getReflectionClass() : ReflectionClass<string|int, T>
Return values
ReflectionClass<string|int, T> —getTypeOfField()
Returns a type name of this field.
public
getTypeOfField(string $fieldName) : string|null
This type names can be implementation specific but should at least include the php types: integer, string, boolean, float/double, datetime.
Parameters
- $fieldName : string
Return values
string|null —hasAssociation()
Checks if the given field is a mapped association for this class.
public
hasAssociation(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —hasField()
Checks if the given field is a mapped property for this class.
public
hasField(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —isAssociationInverseSide()
Checks if the association is the inverse side of a bidirectional association.
public
isAssociationInverseSide(string $assocName) : bool
Parameters
- $assocName : string
Return values
bool —isCollectionValuedAssociation()
Checks if the given field is a mapped collection valued association for this class.
public
isCollectionValuedAssociation(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —isIdentifier()
Checks if the given field name is a mapped identifier for this class.
public
isIdentifier(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —isSingleValuedAssociation()
Checks if the given field is a mapped single valued association for this class.
public
isSingleValuedAssociation(string $fieldName) : bool
Parameters
- $fieldName : string