src/Factory/MenuFactory.php
public function getMenu(string $name): Menu
    {
        if (!$this->hasMenu($name)) {
            throw new Exception('Invalid menu name "'.$name.'"');
        }

        return $this->menus[$name];
    }
public function getMenu(string $name): Menu
    {
        if (!$this->hasMenu($name)) {
            throw new Exception('Invalid menu name "'.$name.'"');
        }

        return $this->menus[$name];
    }
public function getMenu ( string $ name ) : Menu { if ( ! $ this -> hasMenu ( $ name ) ) { throw new Exception ( 'Invalid menu name "' . $ name . '"' ) ; } return $ this -> menus [ $ name ] ; }
Return a menu with the given name.

@param string $name

@return Menu

@throws Exception
Return a menu with the given name .