public static function get($hash = 'default', $mask = 0)
	{
		$hash = strtoupper($hash);

		if ($hash === 'METHOD')
		{
			$hash = strtoupper($_SERVER['REQUEST_METHOD']);
		}

		switch ($hash)
		{
			case 'GET':
				$input = $_GET;
				break;

			case 'POST':
				$input = $_POST;
				break;

			case 'FILES':
				$input = $_FILES;
				break;

			case 'COOKIE':
				$input = $_COOKIE;
				break;

			case 'ENV':
				$input = &$_ENV;
				break;

			case 'SERVER':
				$input = &$_SERVER;
				break;

			default:
				$input = $_REQUEST;
				break;
		}

		$result = self::_cleanVar($input, $mask);

		return $result;
	}
public static function get($hash = 'default', $mask = 0)
	{
		$hash = strtoupper($hash);

		if ($hash === 'METHOD')
		{
			$hash = strtoupper($_SERVER['REQUEST_METHOD']);
		}

		switch ($hash)
		{
			case 'GET':
				$input = $_GET;
				break;

			case 'POST':
				$input = $_POST;
				break;

			case 'FILES':
				$input = $_FILES;
				break;

			case 'COOKIE':
				$input = $_COOKIE;
				break;

			case 'ENV':
				$input = &$_ENV;
				break;

			case 'SERVER':
				$input = &$_SERVER;
				break;

			default:
				$input = $_REQUEST;
				break;
		}

		$result = self::_cleanVar($input, $mask);

		return $result;
	}
public static function get ( $ hash = 'default' , $ mask = 0 ) { $ hash = strtoupper ( $ hash ) ; if ( $ hash === 'METHOD' ) { $ hash = strtoupper ( $ _SERVER [ 'REQUEST_METHOD' ] ) ; } switch ( $ hash ) { case 'GET' : $ input = $ _GET ; break ; case 'POST' : $ input = $ _POST ; break ; case 'FILES' : $ input = $ _FILES ; break ; case 'COOKIE' : $ input = $ _COOKIE ; break ; case 'ENV' : $ input = & $ _ENV ; break ; case 'SERVER' : $ input = & $ _SERVER ; break ; default : $ input = $ _REQUEST ; break ; } $ result = self :: _cleanVar ( $ input , $ mask ) ; return $ result ; }
Fetches and returns a request array.

The default behaviour is fetching variables depending on the
current request method: GET and HEAD will result in returning
$_GET, POST and PUT will result in returning $_POST.

You can force the source by setting the $hash parameter:

post     $_POST
get      $_GET
files    $_FILES
cookie   $_COOKIE
env      $_ENV
server   $_SERVER
method   via current $_SERVER['REQUEST_METHOD']
default  $_REQUEST

@param   string   $hash  to get (POST, GET, FILES, METHOD).
@param   integer  $mask  Filter mask for the variable.

@return  mixed    Request hash.

@deprecated  12.1   User JInput::get
@see         JInput
@since       11.1
Fetches and returns a request array .