src/ORM/Hierarchy/Hierarchy.php
public function getAncestors($includeSelf = false)
    {
        $ancestors = new ArrayList();
        $object = $this->owner;

        if ($includeSelf) {
            $ancestors->push($object);
        }
        while ($object = $object->getParent()) {
            $ancestors->push($object);
        }

        return $ancestors;
    }
public function getAncestors($includeSelf = false)
    {
        $ancestors = new ArrayList();
        $object = $this->owner;

        if ($includeSelf) {
            $ancestors->push($object);
        }
        while ($object = $object->getParent()) {
            $ancestors->push($object);
        }

        return $ancestors;
    }
public function getAncestors ( $ includeSelf = false ) { $ ancestors = new ArrayList ( ) ; $ object = $ this -> owner ; if ( $ includeSelf ) { $ ancestors -> push ( $ object ) ; } while ( $ object = $ object -> getParent ( ) ) { $ ancestors -> push ( $ object ) ; } return $ ancestors ; }
Return all the parents of this class in a set ordered from the closest to furtherest parent.

@param bool $includeSelf
@return ArrayList
Return all the parents of this class in a set ordered from the closest to furtherest parent .