Adding docblocks
This commit is contained in:
parent
b9506ac64a
commit
1d5a0a0a1b
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Doctrine\ORM\Mapping;
|
namespace Doctrine\ORM\Mapping;
|
||||||
|
use ReflectionProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Acts as a proxy to a nested Property structure, making it look like
|
* Acts as a proxy to a nested Property structure, making it look like
|
||||||
@ -30,17 +31,38 @@ namespace Doctrine\ORM\Mapping;
|
|||||||
*/
|
*/
|
||||||
class ReflectionEmbeddedProperty
|
class ReflectionEmbeddedProperty
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var ReflectionProperty
|
||||||
|
*/
|
||||||
private $parentProperty;
|
private $parentProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ReflectionProperty
|
||||||
|
*/
|
||||||
private $childProperty;
|
private $childProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private $class;
|
private $class;
|
||||||
|
|
||||||
public function __construct($parentProperty, $childProperty, $class)
|
/**
|
||||||
|
* @param ReflectionProperty $parentProperty
|
||||||
|
* @param ReflectionProperty $childProperty
|
||||||
|
* @param string $class
|
||||||
|
*/
|
||||||
|
public function __construct(ReflectionProperty $parentProperty, ReflectionProperty $childProperty, $class)
|
||||||
{
|
{
|
||||||
$this->parentProperty = $parentProperty;
|
$this->parentProperty = $parentProperty;
|
||||||
$this->childProperty = $childProperty;
|
$this->childProperty = $childProperty;
|
||||||
$this->class = $class;
|
$this->class = (string) $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $object
|
||||||
|
*
|
||||||
|
* @return object|null
|
||||||
|
*/
|
||||||
public function getValue($object)
|
public function getValue($object)
|
||||||
{
|
{
|
||||||
$embeddedObject = $this->parentProperty->getValue($object);
|
$embeddedObject = $this->parentProperty->getValue($object);
|
||||||
@ -52,6 +74,10 @@ class ReflectionEmbeddedProperty
|
|||||||
return $this->childProperty->getValue($embeddedObject);
|
return $this->childProperty->getValue($embeddedObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param object $object
|
||||||
|
* @param mixed $value
|
||||||
|
*/
|
||||||
public function setValue($object, $value)
|
public function setValue($object, $value)
|
||||||
{
|
{
|
||||||
$embeddedObject = $this->parentProperty->getValue($object);
|
$embeddedObject = $this->parentProperty->getValue($object);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user