/**
 * Return the name of the request component [main component]
 *
 * @param   string  $default  The default option
 *
 * @return  string  Option (e.g. com_something)
 *
 * @since   1.6
 */
public static function getComponentName($default = null)
{
    static $option;
    if ($option) {
        return $option;
    }
    $input = Factory::getApplication()->input;
    $option = strtolower($input->get('option', ''));
    if (empty($option)) {
        $option = $default;
    }
    $input->set('option', $option);
    return $option;
}