ApiGen\Parser\Reflection\Extractors\ParentClassElementsExtractor::getInheritedProperties PHP Method

getInheritedProperties() public method

    public function getInheritedProperties()
    {
        $properties = [];
        $allProperties = array_flip(array_map(function (PropertyReflectionInterface $propertyReflection) {
            return $propertyReflection->getName();
        }, $this->reflectionClass->getOwnProperties()));
        foreach ($this->reflectionClass->getParentClasses() as $class) {
            $inheritedProperties = [];
            foreach ($class->getOwnProperties() as $property) {
                if (!array_key_exists($property->getName(), $allProperties) && !$property->isPrivate()) {
                    $inheritedProperties[$property->getName()] = $property;
                    $allProperties[$property->getName()] = null;
                }
            }
            $properties = $this->sortElements($inheritedProperties, $properties, $class);
        }
        return $properties;
    }