can any one help to convert this into oop i am using this function in the class...

function check($Data){
// sql injection
$Data = trim($Data);
$Data = stripslashes($Data);
$Data = htmlspecialchars($Data);
return $Data;
}

//usage
$name=$Object-> check($_POST["name"]);