protected function getPropertyValue($object, $propertyName)
    {
        if ($object instanceof \Doctrine\ORM\Proxy\Proxy) {
            $object->__load();
        }

        return ObjectAccess::getProperty($object, $propertyName, !ObjectAccess::isPropertyGettable($object, $propertyName));
    }
protected function getPropertyValue($object, $propertyName)
    {
        if ($object instanceof \Doctrine\ORM\Proxy\Proxy) {
            $object->__load();
        }

        return ObjectAccess::getProperty($object, $propertyName, !ObjectAccess::isPropertyGettable($object, $propertyName));
    }
protected function getPropertyValue ( $ object , $ propertyName ) { if ( $ object instanceof \ Doctrine \ ORM \ Proxy \ Proxy ) { $ object -> __load ( ) ; } return ObjectAccess :: getProperty ( $ object , $ propertyName , ! ObjectAccess :: isPropertyGettable ( $ object , $ propertyName ) ) ; }
Load the property value to be used for validation.

In case the object is a doctrine proxy, we need to load the real instance first.

@param object $object
@param string $propertyName
@return mixed
Load the property value to be used for validation .