ReflectionEmbeddedProperty
extends ReflectionProperty
in package
Acts as a proxy to a nested Property structure, making it look like just a single scalar property.
This way value objects "just work" without UnitOfWork, Persisters or Hydrators needing any changes.
TODO: Move this class into Common\Reflection
Table of Contents
Properties
- $childProperty : ReflectionProperty
- $embeddedClass : string
- $instantiator : Instantiator|null
- $parentProperty : ReflectionProperty
Methods
- __construct() : mixed
- getValue() : mixed
- {@inheritDoc}
- setValue() : void
- {@inheritDoc}
Properties
$childProperty
private
ReflectionProperty
$childProperty
reflection property of the embedded object
$embeddedClass
private
string
$embeddedClass
name of the embedded class to be eventually instantiated
$instantiator
private
Instantiator|null
$instantiator
$parentProperty
private
ReflectionProperty
$parentProperty
reflection property of the class where the embedded object has to be put
Methods
__construct()
public
__construct(ReflectionProperty $parentProperty, ReflectionProperty $childProperty, string $embeddedClass) : mixed
Parameters
- $parentProperty : ReflectionProperty
- $childProperty : ReflectionProperty
- $embeddedClass : string
getValue()
{@inheritDoc}
public
getValue([mixed $object = null ]) : mixed
Parameters
- $object : mixed = null
setValue()
{@inheritDoc}
public
setValue(mixed $object[, mixed $value = null ]) : void
Parameters
- $object : mixed
- $value : mixed = null