src/Utilities/Reflection.php
private static function getPropertyValueByParentClasses($source, string $property): array
    {
        $properties = self::getProperties($source, null, true);

        if (empty($properties)) {
            return [
                null,
                false,
            ];
        }

        foreach ($properties as $reflectionProperty) {
            if ($reflectionProperty->getName() === $property) {
                $byReflectionProperty = self::getPropertyValueByReflectionProperty(
                    $source,
                    $property,
                    $reflectionProperty
                );

                return [
                    $byReflectionProperty[0],
                    true,
                ];
            }
        }

        return [
            null,
            false,
        ];
    }
private static function getPropertyValueByParentClasses($source, string $property): array
    {
        $properties = self::getProperties($source, null, true);

        if (empty($properties)) {
            return [
                null,
                false,
            ];
        }

        foreach ($properties as $reflectionProperty) {
            if ($reflectionProperty->getName() === $property) {
                $byReflectionProperty = self::getPropertyValueByReflectionProperty(
                    $source,
                    $property,
                    $reflectionProperty
                );

                return [
                    $byReflectionProperty[0],
                    true,
                ];
            }
        }

        return [
            null,
            false,
        ];
    }
private static function getPropertyValueByParentClasses ( $ source , string $ property ) : array { $ properties = self :: getProperties ( $ source , null , true ) ; if ( empty ( $ properties ) ) { return [ null , false , ] ; } foreach ( $ properties as $ reflectionProperty ) { if ( $ reflectionProperty -> getName ( ) === $ property ) { $ byReflectionProperty = self :: getPropertyValueByReflectionProperty ( $ source , $ property , $ reflectionProperty ) ; return [ $ byReflectionProperty [ 0 ] , true , ] ; } } return [ null , false , ] ; }
Returns value of given property using parent classes

@param mixed  $source   Object that should contains given property
@param string $property Name of the property that contains a value
@return array
Returns value of given property using parent classes