private function getValue($object, \ReflectionProperty $property)
    {
        $value = null;

        if ($property->isPublic()) {
            $value = $property->getValue($object);
        } else {
            // Try to use accessor if property is not public
            $accessorName = $this->formatter->getPhpAccessor($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($accessorName);

            if (null !== $reflectedMethod) {
                $value = $reflectedMethod->invoke($object);
            }
        }

        return $value;
    }
private function getValue($object, \ReflectionProperty $property)
    {
        $value = null;

        if ($property->isPublic()) {
            $value = $property->getValue($object);
        } else {
            // Try to use accessor if property is not public
            $accessorName = $this->formatter->getPhpAccessor($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($accessorName);

            if (null !== $reflectedMethod) {
                $value = $reflectedMethod->invoke($object);
            }
        }

        return $value;
    }
private function getValue ( $ object , \ ReflectionProperty $ property ) { $ value = null ; if ( $ property -> isPublic ( ) ) { $ value = $ property -> getValue ( $ object ) ; } else { // Try to use accessor if property is not public $ accessorName = $ this -> formatter -> getPhpAccessor ( $ property -> getName ( ) , false ) ; $ reflectedObject = new \ ReflectionObject ( $ object ) ; $ reflectedMethod = $ reflectedObject -> getMethod ( $ accessorName ) ; if ( null !== $ reflectedMethod ) { $ value = $ reflectedMethod -> invoke ( $ object ) ; } } return $ value ; }
Return a value for an object property

@param mixed               $object
@param \ReflectionProperty $property

@return mixed
Return a value for an object property