class ReflectionClassMetadata implements ClassMetadata (View source)

A basic impementation of ClassMetadata that use Reflection to implements ClassMetadata interface.

This class should only be used in tests or development phase.

Traits

Id generator related method for ClassMetadata implementations.
Use ReflectionService to set identifier values in a ClassMetadata

Constants

EMBED_PARENT

Embed parent fields and associations

DEFAULT_ID_FIELD_NAME

ASSOCIATION_FIELD_NAME_SUFFIX

COLLECTION_ASSOCIATION_FIELD_NAME_SUFFIX

KEY_PROPERTY

KEY_TYPE

Properties

$idGenerator ID generator-compatible class from IdGeneratorTypeClassnameTrait
array $customGeneratorDefinition from IdGeneratorTypeClassnameTrait
$lifecycleCallbacks
$isMappedSuperclass

Methods

setCustomGeneratorDefinition(array $definition)

No description

ReflectionService
getReflectionService()

No description

setReflection(ReflectionService $reflectionService)

No description

initializeReflection(ReflectionService $reflectionService)

No description

getIdentifierValues($object)

No description

setIdentifierValues(object $object, mixed[] $generatedValues)

No description

__construct($class, $flags = 0)

No description

array
getFieldMappings()

No description

getReflectionProperties()

No description

isIdentifier($fieldName)

No description

getName()

No description

getTypeOfField($fieldName)

No description

getAssociationMappedByTargetField($associationName)

No description

getFieldNames()

No description

getIdentifierFieldNames()

No description

getAssociationNames()

No description

getIdentifier()

No description

hasAssociation($fieldName)

No description

isCollectionValuedAssociation($fieldName)

No description

getReflectionClass()

No description

getReflectionFile()

No description

hasField($fieldName)

No description

isSingleValuedAssociation($fieldName)

No description

getAssociationTargetClass($associationName)

No description

isAssociationInverseSide($associationName)

No description

Details

setIdGeneratorType(string|IdGeneratorInterface $type)

Parameters

string|IdGeneratorInterface $type ID generator type , class nmme or short name

Exceptions

InvalidArgumentException

setCustomGeneratorDefinition(array $definition)

Parameters

array $definition Custom ID generator descriptor

ReflectionService getReflectionService()

Return Value

ReflectionService

setReflection(ReflectionService $reflectionService)

Parameters

ReflectionService $reflectionService Reflection service

initializeReflection(ReflectionService $reflectionService)

Parameters

ReflectionService $reflectionService

getIdentifierValues($object)

Parameters

$object

setIdentifierValues(object $object, mixed[] $generatedValues)

Parameters

object $object Object
mixed[] $generatedValues ID field values

__construct($class, $flags = 0)

Parameters

$class
$flags

getClassNameBasedIdentifierFieldname()

array getFieldMappings()

Return Value

array

getReflectionProperties()

isIdentifier($fieldName)

Parameters

$fieldName

getName()

getTypeOfField($fieldName)

Parameters

$fieldName

getAssociationMappedByTargetField($associationName)

Parameters

$associationName

getFieldNames()

getIdentifierFieldNames()

getAssociationNames()

getIdentifier()

hasAssociation($fieldName)

Parameters

$fieldName

isCollectionValuedAssociation($fieldName)

Parameters

$fieldName

getReflectionClass()

getReflectionFile()

hasField($fieldName)

Parameters

$fieldName

isSingleValuedAssociation($fieldName)

Parameters

$fieldName

getAssociationTargetClass($associationName)

Parameters

$associationName

isAssociationInverseSide($associationName)

Parameters

$associationName