Get root of the tree this configuration object is part of.

@return configuration object root.
192524
public Config getRoot()
  {
    Config root = this;
    while(root.parent != null) {
      root = root.parent;
    }
    return root;
  }
1224107
private INode findRoot() {
        for (INode node : nodes.values()) {
            if (!node.hasParent() && !BASE_NODE.equals(node.getNodeData().getName())) {
                return node;
            }
        }
        return null;
    }
1180828
public function getRootPath()
    {
        if (null === $this->rootPath) {
            if (method_exists($this, 'setRootPath')) {
                $this->rootPath = realpath($this->setRootPath());
            } else {
                $this->rootPath = realpath(__DIR__.'/../../../../..');
            }
        }
        //$this->rootPath = '../';

        return $this->rootPath;
    }
915237
@Override
  public final Controller getRoot() {
	Controller superController = this;
	while (superController.getParent() != null) {
	  superController = superController.getParent();
	}
	return superController;
  }
769056
public function getRoot()
    {
        if (!$this->root) {
            $this->root = $this->active->getContext()->getCurrentSiteNode();
        }

        return $this->root;
    }
1226588
private String getRootId()
    {
        if ( rootId == null ) {
            rootId = getLogin().getElementsByTagName( "home" ).item( 0 ).getTextContent();
        }

        return rootId;
    }
1300502
public static function getRootUrl()
    {
        if (empty(self::$root) && defined('ROOT_URL')) {
            self::$root = ROOT_URL;
            if (!preg_match("/\/$/", self::$root)) {
                self::$root .= '/';
            }
        }

        return self::$root;
    }
1244688
public function getTree()
    {
        $nodes = [];
        foreach ($this->nodes[$this->_config['rootid']]->getDescendants() as $subnode) {
            $nodes[] = $subnode;
        }
        return $nodes;
    }
1112759
public Node getNode() {
        if (node == null) {
            if (resource != null) {
                node = resource.adaptTo(Node.class);
            }
        }
        return node;
    }
1044844
public function getRootPath()
    {
        if (null === $this->rootPath) {
            $this->rootPath = dirname((new \ReflectionClass($this))->getFileName());
        }

        return $this->rootPath;
    }
1253804
public function getRootDirectory()
    {
        if(isset($this->rootDirectory) == false) {
            $this->rootDirectory = $this->locateRootDirectory();
        }
        return $this->rootDirectory;
    }
862022
def find_root(self):
        """"""
        node = self
        while node.parent is not None:
            node = node.parent
        return node
617140
def get_root( self, **kwargs ):
        ''' 
        '''
        if self.parent == None:
            return self
        else:
            return self.parent.get_root( **kwargs )
1240056
public Node parentNode() {

		if (currentNode == null)
			return null;

		Node node = getParentNode(currentNode);

		if (node != null)
			currentNode = node;

		return node;

	}
514142
@Nonnull
  public ExpressionTreeElement getRoot() {
    if (last.isEmptySlot()) {
      return this.last;
    } else {
      ExpressionTreeElement element = last;
      while (!Thread.currentThread().isInterrupted()) {
        final ExpressionTreeElement next = element.getParent();
        if (next == null) {
          return element;
        } else {
          element = next;
        }
      }
    }
    return ExpressionTreeElement.EMPTY_SLOT;
  }
1071708
public function buildTree()
    {
        $this->assertTreeHasRootNode();
        if (null !== $this->tree) {
            return $this->tree;
        }

        return $this->tree = $this->root->getNode(true);
    }
781038
protected CmsObject getRootCmsObject() {

        if (m_rootCms == null) {

            m_rootCms = getOfflineCmsObject(A_CmsUI.getCmsObject());
            m_rootCms.getRequestContext().setSiteRoot("");

        }
        return m_rootCms;
    }