src/Php/ClassHierarchy.php
public function getAncestors($class)
    {
        $ancestors = [];
        while (true) {
            $parent = $this->getParent($class);
            if ($parent) {
                $ancestors[] = $parent;
                $class = $parent;
            } else {
                break;
            }
        }
        return $ancestors;
    }
public function getAncestors($class)
    {
        $ancestors = [];
        while (true) {
            $parent = $this->getParent($class);
            if ($parent) {
                $ancestors[] = $parent;
                $class = $parent;
            } else {
                break;
            }
        }
        return $ancestors;
    }
public function getAncestors ( $ class ) { $ ancestors = [ ] ; while ( true ) { $ parent = $ this -> getParent ( $ class ) ; if ( $ parent ) { $ ancestors [ ] = $ parent ; $ class = $ parent ; } else { break ; } } return $ ancestors ; }
gets all parent classes

@param string $class
@return array
gets all parent classes