ApiGen\Parser\Reflection\Extractors\ParentClassElementsExtractor::getInheritedMethods PHP 메소드

getInheritedMethods() 공개 메소드

public getInheritedMethods ( )
    public function getInheritedMethods()
    {
        $methods = [];
        $allMethods = array_flip(array_map(function (MethodReflectionInterface $methodReflection) {
            return $methodReflection->getName();
        }, $this->reflectionClass->getOwnMethods()));
        foreach ($this->getParentClassesAndInterfaces() as $class) {
            $inheritedMethods = [];
            foreach ($class->getOwnMethods() as $method) {
                if (!array_key_exists($method->getName(), $allMethods) && !$method->isPrivate()) {
                    $inheritedMethods[$method->getName()] = $method;
                    $allMethods[$method->getName()] = null;
                }
            }
            $methods = $this->sortElements($inheritedMethods, $methods, $class);
        }
        return $methods;
    }