protected function getReflectionProperty($name)
    {
        do
        {
            $reflClass = (!isset($reflClass)) ? new \ReflectionClass($this->getObject()) : $reflClass;
            $property = $reflClass->getProperty($name);
            if (isset($property))
            {
                break;
            }
        } while (($reflClass = $reflClass->getParentClass()) !== null);

        if ($property instanceof \ReflectionProperty)
        {
            $property->setAccessible(true);
            return $property;
        } else
        {
            throw new \Exception('Property ' . $name . ' doesn\'t exist on object of class ' . get_class($this->getObject()));
        }
    }
protected function getReflectionProperty($name)
    {
        do
        {
            $reflClass = (!isset($reflClass)) ? new \ReflectionClass($this->getObject()) : $reflClass;
            $property = $reflClass->getProperty($name);
            if (isset($property))
            {
                break;
            }
        } while (($reflClass = $reflClass->getParentClass()) !== null);

        if ($property instanceof \ReflectionProperty)
        {
            $property->setAccessible(true);
            return $property;
        } else
        {
            throw new \Exception('Property ' . $name . ' doesn\'t exist on object of class ' . get_class($this->getObject()));
        }
    }
protected function getReflectionProperty ( $ name ) { do { $ reflClass = ( ! isset ( $ reflClass ) ) ? new \ ReflectionClass ( $ this -> getObject ( ) ) : $ reflClass ; $ property = $ reflClass -> getProperty ( $ name ) ; if ( isset ( $ property ) ) { break ; } } while ( ( $ reflClass = $ reflClass -> getParentClass ( ) ) !== null ) ; if ( $ property instanceof \ ReflectionProperty ) { $ property -> setAccessible ( true ) ; return $ property ; } else { throw new \ Exception ( 'Property ' . $ name . ' doesn\'t exist on object of class ' . get_class ( $ this -> getObject ( ) ) ) ; } }
Get a reflection property - may need to iterate through class parents
@param string $name
Get a reflection property - may need to iterate through class parents