protected function expandMethods($className)
    {
        $class = $this->classDefinitions[$className];

        $newMethods = [];

        foreach (array_merge($class['extends'], $class['implements']) as $extends) {
            if (!isset($this->classDefinitions[$extends])) {
                continue;
            }

            foreach ($this->classDefinitions[$extends]['methods'] as $methodName => $methodInfo) {
                if (!isset($class[$methodName])) {
                    $newMethods[$methodName] = $methodInfo;
                }
            }

            $newMethods = array_merge($newMethods, $this->expandMethods($extends));
        }

        $this->classDefinitions[$className]['methods'] = array_merge(
            $this->classDefinitions[$className]['methods'],
            $newMethods
        );

        return $newMethods;
    }
protected function expandMethods($className)
    {
        $class = $this->classDefinitions[$className];

        $newMethods = [];

        foreach (array_merge($class['extends'], $class['implements']) as $extends) {
            if (!isset($this->classDefinitions[$extends])) {
                continue;
            }

            foreach ($this->classDefinitions[$extends]['methods'] as $methodName => $methodInfo) {
                if (!isset($class[$methodName])) {
                    $newMethods[$methodName] = $methodInfo;
                }
            }

            $newMethods = array_merge($newMethods, $this->expandMethods($extends));
        }

        $this->classDefinitions[$className]['methods'] = array_merge(
            $this->classDefinitions[$className]['methods'],
            $newMethods
        );

        return $newMethods;
    }
protected function expandMethods ( $ className ) { $ class = $ this -> classDefinitions [ $ className ] ; $ newMethods = [ ] ; foreach ( array_merge ( $ class [ 'extends' ] , $ class [ 'implements' ] ) as $ extends ) { if ( ! isset ( $ this -> classDefinitions [ $ extends ] ) ) { continue ; } foreach ( $ this -> classDefinitions [ $ extends ] [ 'methods' ] as $ methodName => $ methodInfo ) { if ( ! isset ( $ class [ $ methodName ] ) ) { $ newMethods [ $ methodName ] = $ methodInfo ; } } $ newMethods = array_merge ( $ newMethods , $ this -> expandMethods ( $ extends ) ) ; } $ this -> classDefinitions [ $ className ] [ 'methods' ] = array_merge ( $ this -> classDefinitions [ $ className ] [ 'methods' ] , $ newMethods ) ; return $ newMethods ; }
This method goes through all the class definitions, and adds non-overridden method
information from parent classes.

@param string $className

@return array
This method goes through all the class definitions and adds non - overridden method information from parent classes .