public static function getClassProperties($class, $inParents = false, $filter = null)
    {
        if ($filter === null) {
            $filter = \ReflectionProperty::IS_PRIVATE
                | \ReflectionProperty::IS_PROTECTED
                | \ReflectionProperty::IS_PUBLIC;
        }

        $reflection = self::loadClassReflection($class);

        if (!$inParents) {
            return $reflection->getProperties($filter);
        }

        $properties = [];

        do {
            $properties = array_merge(
                $reflection->getProperties($filter),
                $properties
            );
        } while ($reflection = $reflection->getParentClass());

        return $properties;
    }
public static function getClassProperties($class, $inParents = false, $filter = null)
    {
        if ($filter === null) {
            $filter = \ReflectionProperty::IS_PRIVATE
                | \ReflectionProperty::IS_PROTECTED
                | \ReflectionProperty::IS_PUBLIC;
        }

        $reflection = self::loadClassReflection($class);

        if (!$inParents) {
            return $reflection->getProperties($filter);
        }

        $properties = [];

        do {
            $properties = array_merge(
                $reflection->getProperties($filter),
                $properties
            );
        } while ($reflection = $reflection->getParentClass());

        return $properties;
    }
public static function getClassProperties ( $ class , $ inParents = false , $ filter = null ) { if ( $ filter === null ) { $ filter = \ ReflectionProperty :: IS_PRIVATE | \ ReflectionProperty :: IS_PROTECTED | \ ReflectionProperty :: IS_PUBLIC ; } $ reflection = self :: loadClassReflection ( $ class ) ; if ( ! $ inParents ) { return $ reflection -> getProperties ( $ filter ) ; } $ properties = [ ] ; do { $ properties = array_merge ( $ reflection -> getProperties ( $ filter ) , $ properties ) ; } while ( $ reflection = $ reflection -> getParentClass ( ) ) ; return $ properties ; }
Get class properties

@param string $class
@param bool   $inParents
@param int    $filter

@return \ReflectionProperty[]
Get class properties