public function getAncestors($ignoreSelf = false)
    {
        $ancestors = [];

        if (false === $ignoreSelf) {
            $ancestors[$this->name] = $this->appName;
        }

        /** @var $parent Node */
        foreach ($this->parent as $parent) {
            $parentAncenstors = $parent->getAncestors();

            $ancestors = array_merge($parentAncenstors, $ancestors);
        }

        return $ancestors;
    }
public function getAncestors($ignoreSelf = false)
    {
        $ancestors = [];

        if (false === $ignoreSelf) {
            $ancestors[$this->name] = $this->appName;
        }

        /** @var $parent Node */
        foreach ($this->parent as $parent) {
            $parentAncenstors = $parent->getAncestors();

            $ancestors = array_merge($parentAncenstors, $ancestors);
        }

        return $ancestors;
    }
public function getAncestors ( $ ignoreSelf = false ) { $ ancestors = [ ] ; if ( false === $ ignoreSelf ) { $ ancestors [ $ this -> name ] = $ this -> appName ; } /** @var $parent Node */ foreach ( $ this -> parent as $ parent ) { $ parentAncenstors = $ parent -> getAncestors ( ) ; $ ancestors = array_merge ( $ parentAncenstors , $ ancestors ) ; } return $ ancestors ; }
Get ancestors from the first ancestor aka adam and eve to upto this
node.that is oldest at index '0'.

@return array
Get ancestors from the first ancestor aka adam and eve to upto this node . that is oldest at index 0 .