private function convertValue($value, $type){

        switch($type){
            case "is_numeric":
                $value = floatval($value);
                break;
            case "is_float":
                $value = floatval($value);
                break;
            case "is_string":
                $value = strval($value);
                break;
            default:
                $value = strval($value);
        }

        return $value;
    }
private function convertValue($value, $type){

        switch($type){
            case "is_numeric":
                $value = floatval($value);
                break;
            case "is_float":
                $value = floatval($value);
                break;
            case "is_string":
                $value = strval($value);
                break;
            default:
                $value = strval($value);
        }

        return $value;
    }
private function convertValue ( $ value , $ type ) { switch ( $ type ) { case "is_numeric" : $ value = floatval ( $ value ) ; break ; case "is_float" : $ value = floatval ( $ value ) ; break ; case "is_string" : $ value = strval ( $ value ) ; break ; default : $ value = strval ( $ value ) ; } return $ value ; }
values are converted thanks to the given type
@param mixed $value the value to convert
@param String $type the function name for data type testing: "is_numeric" or "is_string"
@return the converted value
values are converted thanks to the given type