src/Joomlatools/Console/Joomla/Application.php
public function getMenu($name = null, $options = array())
    {
        if (!isset($name))
        {
            $app = JFactory::getApplication();
            $name = $app->getName();
        }

        try
        {
            if (!class_exists('JMenu' . ucfirst($name))) {
                jimport('cms.menu.'.strtolower($name));
            }

            $menu = JMenu::getInstance($name, $options);
        }
        catch (Exception $e) {
            return null;
        }

        return $menu;
    }
public function getMenu($name = null, $options = array())
    {
        if (!isset($name))
        {
            $app = JFactory::getApplication();
            $name = $app->getName();
        }

        try
        {
            if (!class_exists('JMenu' . ucfirst($name))) {
                jimport('cms.menu.'.strtolower($name));
            }

            $menu = JMenu::getInstance($name, $options);
        }
        catch (Exception $e) {
            return null;
        }

        return $menu;
    }
public function getMenu ( $ name = null , $ options = array ( ) ) { if ( ! isset ( $ name ) ) { $ app = JFactory :: getApplication ( ) ; $ name = $ app -> getName ( ) ; } try { if ( ! class_exists ( 'JMenu' . ucfirst ( $ name ) ) ) { jimport ( 'cms.menu.' . strtolower ( $ name ) ) ; } $ menu = JMenu :: getInstance ( $ name , $ options ) ; } catch ( Exception $ e ) { return null ; } return $ menu ; }
Returns the application JMenu object.

@param   string  $name     The name of the application/client.
@param   array   $options  An optional associative array of configuration settings.

@return  JMenu
Returns the application JMenu object .