public static \Joomla\CMS\Router\Router
getRouter
(mixed $name = null, array $options = array())
/**
 * Returns the application Router object.
 *
 * @param   string  $name     The name of the application.
 * @param   array   $options  An optional associative array of configuration settings.
 *
 * @return  Router
 *
 * @since   3.2
 */
public static function getRouter($name = null, array $options = array())
{
    $app = Factory::getApplication();
    if (!isset($name)) {
        $name = $app->getName();
    }
    $options['mode'] = $app->get('sef');
    return Router::getInstance($name, $options);
}