src/Mapping/MappingFactory.php
protected static function getClassProperties(string $className) : array
    {
        if (empty(static::$classProperties[$className])) {
            $ref = new ReflectionClass($className);
            $properties = [];
            foreach ($ref->getProperties() as $prop) {
                $f = $prop->getName();
                $properties[$f] = $prop;
            }

            if ($parentClass = $ref->getParentClass()) {
                $parentPropsArr = static::getClassProperties($parentClass->getName());
                if (\count($parentPropsArr) > 0) {
                    $properties = \array_merge($parentPropsArr, $properties);
                }
            }
            static::$classProperties[$className] = \array_keys($properties);
        }

        return static::$classProperties[$className];
    }
protected static function getClassProperties(string $className) : array
    {
        if (empty(static::$classProperties[$className])) {
            $ref = new ReflectionClass($className);
            $properties = [];
            foreach ($ref->getProperties() as $prop) {
                $f = $prop->getName();
                $properties[$f] = $prop;
            }

            if ($parentClass = $ref->getParentClass()) {
                $parentPropsArr = static::getClassProperties($parentClass->getName());
                if (\count($parentPropsArr) > 0) {
                    $properties = \array_merge($parentPropsArr, $properties);
                }
            }
            static::$classProperties[$className] = \array_keys($properties);
        }

        return static::$classProperties[$className];
    }
protected static function getClassProperties ( string $ className ) : array { if ( empty ( static :: $ classProperties [ $ className ] ) ) { $ ref = new ReflectionClass ( $ className ) ; $ properties = [ ] ; foreach ( $ ref -> getProperties ( ) as $ prop ) { $ f = $ prop -> getName ( ) ; $ properties [ $ f ] = $ prop ; } if ( $ parentClass = $ ref -> getParentClass ( ) ) { $ parentPropsArr = static :: getClassProperties ( $ parentClass -> getName ( ) ) ; if ( \ count ( $ parentPropsArr ) > 0 ) { $ properties = \ array_merge ( $ parentPropsArr , $ properties ) ; } } static :: $ classProperties [ $ className ] = \ array_keys ( $ properties ) ; } return static :: $ classProperties [ $ className ] ; }
Recursive function to get an associative array of class properties by
property name, including inherited ones from extended classes.

@param string $className Class name

@return array

@link http://php.net/manual/es/reflectionclass.getproperties.php#88405
Recursive function to get an associative array of class properties by property name including inherited ones from extended classes .