Returns the previous (last persisted) state of the property.
If nothing is found, NULL is returned.

@param object $object
@param string $propertyName
@return mixed
9811
public function getCleanStateOfProperty($object, $propertyName)
    {
        if ($this->isReconstitutedEntity($object) === false) {
            return null;
        }
        $identifier = $this->getIdentifierByObject($object);
        if (!isset($this->reconstitutedEntitiesData[$identifier]['properties'][$propertyName])) {
            return null;
        }
        return $this->reconstitutedEntitiesData[$identifier]['properties'][$propertyName];
    }
1218396
private function isPublic($object, string $propertyName): bool
    {
        $objectArray = (array) $object;

        return array_key_exists($propertyName, $objectArray);
    }
1240668
public function getObjectValue($object, $name)
    {
        if (is_object($object) && isset($object->$name) && !method_exists($object, $name)) {
            return $object->$name;
        }

        // If its a nested value like meta[user[phone]]
        if (strpos($name, '[') > 0) {
            $nested = explode('[', str_replace(']', '', $name));
            $final = $object;
            foreach ($nested as $property) {
                if (!empty($property) && isset($final->{$property})) {
                    $final = $final->{$property};
                } elseif (is_object($final) && is_null($final->{$property})) {
                    $final = '';
                }
            }

            return $final;
        }

        return '';
    }
699331
public static function getInjectValue($className, $propertyName)
    {
        list($annotations, $configs) = static::getInjects($className);
        if(isset($configs[$propertyName]))
        {
            return $configs[$propertyName];
        }
        else
        {
            $annotation = $annotations[0] ?? null;
            if($annotation)
            {
                return $annotation->getRealValue();
            }
            else
            {
                return null;
            }
        }
    }
842849
public function with($object, $name = null)
    {
        if (is_array($object)) {
            $carry = null;
            foreach ($object as $propertyName => $value) {
                $carry = $this->setProperty($value, $propertyName);
            }
            return $carry;
        }
        return $this->setProperty($object, $name);
    }
958518
protected function getPropertyValue($propertyName)
    {
        $desiredKey = $this->trimPrefixKey($propertyName);

        $getter = 'get' . ucfirst($this->getPropertyName($desiredKey));
        if (method_exists($this, $getter)) {
            return $this->$getter();
        }

        // Otherwise, try to get sub object to get data
        $subKey = strtolower(strstr($desiredKey, '_', true));
        $getterMethodName = 'get' . ucfirst($subKey);

        $subObject = $this->$getterMethodName();
        if ($subObject instanceof EntityAbstract) {
            return $subObject->getPropertyValue($desiredKey);
        }

        throw new \InvalidArgumentException(
            sprintf(
                'No getter set for %s (getter was %s:%s)',
                $propertyName,
                get_called_class(),
                $getter
            )
        );
    }
381388
protected function getInaccessibleProperty($object, $name)
    {
        $property = $this->getProperty($object, $name);
        $property->setAccessible(true);
        return $property->getValue(is_object($object) ? $object : null);
    }
1058646
protected function getPropertyValue($object, $propertyName)
    {
        if ($object instanceof \Doctrine\ORM\Proxy\Proxy) {
            $object->__load();
        }

        return ObjectAccess::getProperty($object, $propertyName, !ObjectAccess::isPropertyGettable($object, $propertyName));
    }
282466
private function isExistingPropertyGetterAvailable(string $propertyName): bool
    {
        assert($this->propertyExists($propertyName));
        if ($this->isExistingPropertyVirtual($propertyName)) {
            return !is_null($this->virtualGetters[$propertyName]);
        } else {
            return $this->realGetAvailable[$propertyName];
        }
    }
204198
protected function isPropertyGettable($object, $propertyName)
    {
        $flag = false;

        if (ObjectAccess::isPropertyGettable($object, $propertyName)) {
            $flag = true;
            $getterMethodName = 'get' . ucfirst($propertyName);

            if (false === method_exists($object, $getterMethodName)
                && is_callable([$object, $getterMethodName])
            ) {
                try {
                    $object->$getterMethodName();
                } catch (\Exception $e) {
                    if ($e instanceof MethodNotFoundException
                        || false === $e instanceof SilentExceptionInterface
                    ) {
                        $flag = false;
                    }
                }
            }
        }

        return $flag;
    }
861341
public function getDefaultPropertyValue($className, $propertyName)
    {
        $reflection = new \ReflectionClass($className);
        $values = $reflection->getDefaultProperties();
        return $values[$propertyName] ?? null;
    }
666881
public function get(string $object)
    {
        return ($this->exists($object)) ? $this->registry[$object] : null;
    }
1154832
public static function readProperty($object, $property, array $access)
    {
        if (AccessInfo::METHOD === $access['type']) {
            $value = $object->{$access['name']}();
        } elseif (AccessInfo::PROPERTY === $access['type']) {
            $value = $object->{$access['name']};
        } elseif (!$access['has_property'] && property_exists($object, $property)) {
            $value = $object->$property;
        } else {
            throw new \RuntimeException($access['name']);
        }

        return $value;
    }
836977
public static function getValue($object, $propertyName)
    {


        if (property_exists($object, $propertyName) || isset($object->$propertyName)) {
            try {
                return $object->$propertyName;
                // @codingStandardsIgnoreLine
            } catch (\BadFunctionCallException $e) {
                //Do nothing and continue
                // @codingStandardsIgnoreLine
            } catch (\InvalidArgumentException $e) {
                //Do nothing and continue
            }
        }


        throw new \InvalidArgumentException(
            vsprintf('The class "%s" does not have the property "%s" or it\'s not readable', array(
                get_class($object),
                $propertyName
            ))
        );
    }
867778
protected function getQualifiedForeignKeyName($object)
    {
        if (method_exists($object, 'getQualifiedForeignKeyName')) {
            return $object->getQualifiedForeignKeyName();
        }

        if (method_exists($object, 'getQualifiedForeignPivotKeyName')) {
            return $object->getQualifiedForeignPivotKeyName();
        }

        return $object->getForeignKey();
    }
497554
public function getGettablePropertiesOfObject($object)
    {
        $className = get_class($object);

        if (false === isset($this->gettablePropertiesOfObjects[$className])) {
            $this->gettablePropertiesOfObjects[$className] = [];
            $properties = $this->getReflectionService()->getClassPropertyNames($className);

            foreach ($properties as $propertyName) {
                if (true === $this->isPropertyGettable($object, $propertyName)) {
                    $this->gettablePropertiesOfObjects[$className][] = $propertyName;
                }
            }
        }

        return $this->gettablePropertiesOfObjects[$className];
    }
370647
final public function get($varname)
    {
        $previous = isset($this->data[$varname]) ? $this->data[$varname] : null;

        return $previous;
    }