Return all the parents of this class in a set ordered from the lowest to highest parent.

@return SS_List
178839
public function getAncestors() {
        $ancestors=new ArrayList();
        $object   =$this->owner;
        
        while($object=$object->Language()) {
            $ancestors->push($object);
        }
        
        return $ancestors;
    }
456281
public function getAllParentRoles()
    {
        $reducer = function (array $result, Role $role) {
            $result[$role->getIdentifier()] = $role;
            return array_merge($result, $role->getAllParentRoles());
        };

        return array_reduce($this->parentRoles, $reducer, []);
    }
288707
protected function getParentClassName()
    {
        if (is_null($this->getChild()->getAncestor())) {
            return $this->getNewStubQueryBuilder($this->getTable())->getUnqualifiedClassName();
        }

        $ancestorClassName = ClassTools::classname($this->getChild()->getAncestor());
        if ($this->getDatabase()->hasTableByPhpName($ancestorClassName)) {
            return $this->getNewStubQueryBuilder($this->getDatabase()->getTableByPhpName($ancestorClassName))->getUnqualifiedClassName();
        }

        // find the inheritance for the parent class
        foreach ($this->getTable()->getChildrenColumn()->getChildren() as $child) {
            if ($child->getClassName() == $ancestorClassName) {
                return $this->getNewStubQueryInheritanceBuilder($child)->getUnqualifiedClassName();
            }
        }
    }
874502
function sort()
    {
        $rootNodes = $this->getRootNodes();

        $sorted = array();
        while ( count( $this->nodes ) > 0 ) {
            // check for circular reference
            if ( count( $rootNodes ) === 0 )
                return false;

            // remove this node from rootNodes and add it to the output
            $current = array_shift( $rootNodes );
            $sorted[] = $current->name;

            // for each of its children queue the new node and remove the original
            while ( $child = $current->popChild() )
            {
                $child->unregisterParent( $this->nodes[$current->name] );
                // if this child has no more parents, add it to the root nodes list
                if ( $child->parentCount() === 0 )
                    $rootNodes[] = $child;
            }

            unset( $this->nodes[$current->name] );
        }
        return $sorted;
    }
1084688
public function getParentClass()
    {
        $parentClass  = parent::getParentClass();
        if (null === $parentClass || false === $parentClass) {
            return null;
        }
        
        $moufRefClass = new self($parentClass->getName());
        return $moufRefClass;
    }
581078
public function getRoot()
    {
        $next_parent = $this->getParent();
        $parent = null;
        while ($next_parent) {
            $parent = $next_parent;
            $next_parent = $parent->getParent();
        }

        return $parent ? $parent : $this;
    }
647187
public function hierarchy()
    {
        if ($this->hierarchy === null) {
            $hierarchy = [];

            $parent = $this->getParent();
            while ($parent) {
                $hierarchy[] = $parent;
                $parent = $parent->getParent();
            }

            $this->hierarchy = $hierarchy;
        }

        return $this->hierarchy;
    }
1321378
public function getPossibleParents() {
    $result = [];
    $relations = $this->getRelations('parent');
    foreach ($relations as $curRelation) {
      $result[$curRelation->getOtherRole()] = $curRelation;
    }
    return $result;
  }
1357894
public function getLevel()
    {
        if ($this->_level !== null) {
            return $this->_level;
        }

        if ($this->isRoot()) {
            $this->_level = -1;
            return $this->_level;
        }

        $parents = array($this);
        $node = $this;

        while ($parent = $node->getParent()){
            if (!$parent->isRoot()) {
                $parents[] = $parent;
            }
            $node = $parent;
        }

        $this->_level = count($parents);

        return $this->_level;
    }
258251
public function getParentList(){
        if(!$this->isPropertyAvailable('ParentList')){
            $this->setProperty("ParentList", new SPList($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "parentlist")),false);
        }
        return $this->getProperty("ParentList");
    }
163625
public function getChildren()
    {
        return $this->owner
            ->hasMany($this->ownerClassName, [ $this->parentIdField => $this->primaryKey ])
            ->orderBy([
                "$this->tableName.$this->sortField" => SORT_ASC,
                "$this->tableName.$this->primaryKey" => SORT_ASC,
            ]);
    }
505233
public function findDistinct()
	{
		$a = [];
		foreach ($this->parents as $x => $r) {
			$a[$this->find($x)] = null;
		}
		return array_keys($a);
	}
255515
private function getParentAndChildrenEntities() {
        $parentEntities = array();
        $childrenEntities = array();
        foreach($this->getModelBuilder()->getRelationships() as $relationship) {
            if($relationship->isPlural()) {
                $parentEntities[] = $relationship->getAlias() . '.*';
            } else {
                $childrenEntities[] = $relationship->getAlias() . '.*';
            }
        }

        return array($parentEntities, $childrenEntities);
    }
263549
def parents
      all_parents = Array.new
      # Extract all parents and add to array recursively:
      if parent
        all_parents = parent.parents if parent.parent
        all_parents.insert(0, parent)
      end
      return all_parents
    end
883194
def get_klass_parents(gi_name):
    '''
    
    '''
    res = []
    parents = __HIERARCHY_GRAPH.predecessors(gi_name)
    if not parents:
        return []
    __get_parent_link_recurse(parents[0], res)
    return res
31704
public function getRootFamilies()
    {
        $root = [];
        foreach ($this->getFamilies() as $family) {
            if ($family->isInstantiable()) {
                $p = $family->getParent();
                if (!$p || ($p && !$p->isInstantiable())) {
                    $root[$family->getCode()] = $family;
                }
            }
        }

        return $root;
    }
894811
public function getListSorting()
    {
        $sorting = parent::getListSorting();
        if (isset($sorting["oxorder"]["oxbilllname"])) {
            $this->_blDesc = false;
        }

        return $sorting;
    }