1: <?php
2:
3: namespace webfilesframework\io\form\validation;
4:
5: 6: 7: 8: 9: 10:
11: class MValidator
12: {
13:
14: 15: 16: 17: 18:
19: public static function validateUrlParam($urlParam)
20: {
21: return htmlspecialchars($urlParam);
22: }
23:
24: 25: 26: 27: 28: 29:
30: public static function cutLongWords($comment, $len = 25)
31: {
32: $returnvalue = $comment;
33: do {
34: $comment = $returnvalue;
35: $returnvalue = preg_replace('~(^|\s)(\S{' . $len . '})(\S)~S', '\1\2 \3', $comment);
36: } while ($returnvalue != $comment);
37: return $returnvalue;
38: }
39: }
40:
41: