static public function getParents($className)
    {
        $parents = [];
        $parent = new \ReflectionClass($className);
        while (true) {
            $parent = $parent->getParentClass();
            if (!$parent) {
                break;
            } else {
                $parents[] = $parent->getName();
            }
        }
        return $parents;
    }
static public function getParents($className)
    {
        $parents = [];
        $parent = new \ReflectionClass($className);
        while (true) {
            $parent = $parent->getParentClass();
            if (!$parent) {
                break;
            } else {
                $parents[] = $parent->getName();
            }
        }
        return $parents;
    }
static public function getParents ( $ className ) { $ parents = [ ] ; $ parent = new \ ReflectionClass ( $ className ) ; while ( true ) { $ parent = $ parent -> getParentClass ( ) ; if ( ! $ parent ) { break ; } else { $ parents [ ] = $ parent -> getName ( ) ; } } return $ parents ; }
Returns all parents of a class.

@return array
Returns all parents of a class .