private function getDocumentPropertiesReflection(\ReflectionClass $reflectionClass)
    {
        if (in_array($reflectionClass->getName(), $this->properties)) {
            return $this->properties[$reflectionClass->getName()];
        }

        $properties = [];

        foreach ($reflectionClass->getProperties() as $property) {
            if (!in_array($property->getName(), $properties)) {
                $properties[$property->getName()] = $property;
            }
        }

        $parentReflection = $reflectionClass->getParentClass();
        if ($parentReflection !== false) {
            $properties = array_merge(
                $properties,
                array_diff_key($this->getDocumentPropertiesReflection($parentReflection), $properties)
            );
        }

        $this->properties[$reflectionClass->getName()] = $properties;

        return $properties;
    }
private function getDocumentPropertiesReflection(\ReflectionClass $reflectionClass)
    {
        if (in_array($reflectionClass->getName(), $this->properties)) {
            return $this->properties[$reflectionClass->getName()];
        }

        $properties = [];

        foreach ($reflectionClass->getProperties() as $property) {
            if (!in_array($property->getName(), $properties)) {
                $properties[$property->getName()] = $property;
            }
        }

        $parentReflection = $reflectionClass->getParentClass();
        if ($parentReflection !== false) {
            $properties = array_merge(
                $properties,
                array_diff_key($this->getDocumentPropertiesReflection($parentReflection), $properties)
            );
        }

        $this->properties[$reflectionClass->getName()] = $properties;

        return $properties;
    }
private function getDocumentPropertiesReflection ( \ ReflectionClass $ reflectionClass ) { if ( in_array ( $ reflectionClass -> getName ( ) , $ this -> properties ) ) { return $ this -> properties [ $ reflectionClass -> getName ( ) ] ; } $ properties = [ ] ; foreach ( $ reflectionClass -> getProperties ( ) as $ property ) { if ( ! in_array ( $ property -> getName ( ) , $ properties ) ) { $ properties [ $ property -> getName ( ) ] = $ property ; } } $ parentReflection = $ reflectionClass -> getParentClass ( ) ; if ( $ parentReflection !== false ) { $ properties = array_merge ( $ properties , array_diff_key ( $ this -> getDocumentPropertiesReflection ( $ parentReflection ) , $ properties ) ) ; } $ this -> properties [ $ reflectionClass -> getName ( ) ] = $ properties ; return $ properties ; }
Returns all defined properties including private from parents.

@param \ReflectionClass $reflectionClass

@return array
Returns all defined properties including private from parents .