public function getRootId()
    {
        if (empty($this->hierarchy)) {
            throw new Exception\LogicException('The root item does not exist.');
        }

        reset($this->hierarchy);
        $id = key($this->hierarchy);

        return $id;
    }
public function getRootId()
    {
        if (empty($this->hierarchy)) {
            throw new Exception\LogicException('The root item does not exist.');
        }

        reset($this->hierarchy);
        $id = key($this->hierarchy);

        return $id;
    }
public function getRootId ( ) { if ( empty ( $ this -> hierarchy ) ) { throw new Exception \ LogicException ( 'The root item does not exist.' ) ; } reset ( $ this -> hierarchy ) ; $ id = key ( $ this -> hierarchy ) ; return $ id ; }
Returns the identifier of the root item

@return string

@throws Exception\LogicException if the root item does not exist
Returns the identifier of the root item