public function getLevel()
    {
        if($this->level === null)
        {
            $this->level = count($this->getAncestors());
        }

        return $this->level;
    }
public function getLevel()
    {
        if($this->level === null)
        {
            $this->level = count($this->getAncestors());
        }

        return $this->level;
    }
public function getLevel ( ) { if ( $ this -> level === null ) { $ this -> level = count ( $ this -> getAncestors ( ) ) ; } return $ this -> level ; }
gets the level of this node

@return int
gets the level of this node