public static function getPropertyValueOfParentClass($instance, $name) {
        $class = new \ReflectionClass($instance);
        $parent = $class->getParentClass();
        $property = $parent->getProperty($name);
        $property->setAccessible(true);

        return $property->getValue($instance);
    }
public static function getPropertyValueOfParentClass($instance, $name) {
        $class = new \ReflectionClass($instance);
        $parent = $class->getParentClass();
        $property = $parent->getProperty($name);
        $property->setAccessible(true);

        return $property->getValue($instance);
    }
public static function getPropertyValueOfParentClass ( $ instance , $ name ) { $ class = new \ ReflectionClass ( $ instance ) ; $ parent = $ class -> getParentClass ( ) ; $ property = $ parent -> getProperty ( $ name ) ; $ property -> setAccessible ( true ) ; return $ property -> getValue ( $ instance ) ; }
Gets the property value of the base class.
If the property is unavailable, makes it available.

@param mixed $instance The class instance, that contains the property.
@param string $name The name of the property.

@return mixed
Gets the property value of the base class . If the property is unavailable makes it available .