Gets Property Class of the given property.
If the class is null, it returns null.
If the property is not found, it returns null.

@param $class
@param $propertyName
@return null|string
@throws ConfigurationException
540446
public static function getPropertyClass($class, $propertyName)
    {
        if ($class == get_class(new PayUModel())) {
            // Make it generic if PayUModel is used for generating this
            return get_class(new PayUModel());
        }

        // If the class doesn't exist, or the method doesn't exist, return null.
        if (!class_exists($class) || !method_exists($class, self::getter($class, $propertyName))) {
            return null;
        }

        if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {
            $param = $annotations['return'];
        }

        if (isset($param)) {
            $anno = preg_split("/[\s\[\]]+/", $param);
            return $anno[0];
        } else {
            throw new ConfigurationException("Getter function for '$propertyName' in '$class' class should have a proper return type.");
        }
    }
255920
public function getStatus($propertyName)
    {
        return isset($this->result[$propertyName]) ? $this->result[$propertyName][0] : null;
    }
781640
public function getClassProperties($class)
    {
        $result = '';
        foreach($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property)
        {
            $static = $property->isStatic() ? ' static' : '';
            $name = $property->name;
            $result .= <<<CODE
    public{$static} \${$name};

CODE;
        }
        return $result;
    }
527981
public static function getStaticPropertyValue($class, $name) {
        $property = new \ReflectionProperty($class, $name);
        $property->setAccessible(true);
        return $property->getValue(null);
    }
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];
    }
1046034
public static function getConfigFromDomainClass($className) {
		$definition = ClassHelper::normalizeComponentConfig($className);
		/** @var Domain $domain */
		$domain = Yii::createObject($definition);
		$config = $domain->config();
		return $config;
	}
312015
private function getPropertyInfo(string $propertyName, string $className, int $specVersion = 2): stdClass
    {
        foreach ($this->getProperties($className, $specVersion) as $classPropertyName => $property) {
            if ($classPropertyName === $propertyName) {
                return $property;
            }
        }

        throw new \InvalidArgumentException(sprintf('The property "%s" for the class "%s" doesn\'t exist.', $propertyName, $className));
    }
188236
protected static function getReflectionClassWithProperty($class, $propertyName)
    {
        Assert::string($class, 'First argument to Reflection::getReflectionClassWithProperty must be string. Variable of type "%s" was given.');
        Assert::classExists($class, 'Could not find class "%s"');

        $refl = new \ReflectionClass($class);
        if ($refl->hasProperty($propertyName)) {
            return $refl;
        }

        if (false === $parent = get_parent_class($class)) {
            // No more parents
            return;
        }

        return self::getReflectionClassWithProperty($parent, $propertyName);
    }
272640
private function getDocBlockFromProperty($class, $property)
    {
        // Use a ReflectionProperty instead of $class to get the parent class if applicable
        try {
            $reflectionProperty = new \ReflectionProperty($class, $property);
        } catch (\ReflectionException $e) {
            return;
        }

        return $this->docBlockFactory->create($reflectionProperty, $this->contextFactory->createFromReflector($reflectionProperty->getDeclaringClass()));
    }
601201
public static function isPropertyClassArray($class, $propertyName)
    {
        // If the class doesn't exist, or the method doesn't exist, return null.
        if (!class_exists($class) || !method_exists($class, self::getter($class, $propertyName))) {
            return null;
        }

        if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {
            $param = $annotations['return'];
        }

        if (isset($param)) {
            return substr($param, -strlen('[]')) === '[]';
        } else {
            throw new BlockCypherConfigurationException("Getter function for '$propertyName' in '$class' class should have a proper return type.");
        }
    }
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
            )
        );
    }
151953
public static function fetchStaticProperty($class, $property)
    {
        $refl = new \ReflectionClass($class);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue();
    }
1045653
public function getProperty($propertyName)
    {
        if ('id' === $propertyName) {
            return $this->getID();
        }

        if (\array_key_exists($propertyName, $this->arrProperties)) {
            return $this->arrProperties[$propertyName];
        }

        return null;
    }
1340291
public static function getValue($object, $propertyName)
    {
        $classReflection = new \ReflectionClass(get_class($object));
        if (!$classReflection->hasProperty($propertyName)) {
            throw new \InvalidArgumentException(
                'The class "' . get_class($object) . '" does not have the property "' . $propertyName . '"'
            );
        }
        $propertyReflection = $classReflection->getProperty($propertyName);
        if ($propertyReflection->isPublic()) {
            return $propertyReflection->getValue($object);
        }

        if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
            $propertyReflection->setAccessible(true);
            $value = $propertyReflection->getValue($object);
            $propertyReflection->setAccessible(false);
            return $value;
        }

        throw new \InvalidArgumentException(
            'The property "' . $propertyName . '" of the class "' . get_class($object) . '" is not readable'
        );
    }
837702
public function getPropertyMetadata($propertyName)
    {
        if (!isset($this->propertyMetadata[$propertyName])) {
            throw MappingException::mappingNotFound($this->name, $propertyName);
        }

        return $this->propertyMetadata[$propertyName];
    }
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
            ))
        );
    }
1368076
public function getProperty($propertyName)
    {
        if (isset($this->properties[$propertyName])) {
            return $this->properties[$propertyName];
        }

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition) {
            if ($extendsClassDefinition->hasProperty($propertyName)) {
                return $extendsClassDefinition->getProperty($propertyName);
            }
        }

        return false;
    }