0

If you don't mind that it checks more things than just POST and GET, you can use the $_REQUEST superglobal instead:
public function get($item) {
if ( isset($_REQUEST[$item]) && $_REQUEST[$item] != '' ) {
$_REQUEST[$item] = filter_var($_REQUEST[$item], FILTER_SANITIZE_SPECIAL_CHARS)...