$input = JFactory::getApplication()->input; $post_var = $input->getVar('post_var', 'default_value', 'filter_type');
$input = JFactory::getApplication()->input; $get_var = $input->getVar('get_var', '', 'STRING');This example retrieves the value of the 'get_var' global GET variable. If the variable is not found, an empty string will be returned. The third parameter specifies that the variable should be treated as a string type. The getVar() method is a part of the Joomla\Input\Input interface from the Joomla Framework package.