| 1 | <?php |
||
| 11 | final class Validation extends Singleton |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Filter an Username from the Invalid Names Base. |
||
| 15 | * |
||
| 16 | * @param string $username |
||
| 17 | * |
||
| 18 | * @return bool |
||
| 19 | */ |
||
| 20 | public function filterUserName(string $username): bool |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Check String Size. |
||
| 28 | * |
||
| 29 | * @param string $needle |
||
| 30 | * @param int $min |
||
| 31 | * @param int $max |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | public function checkSize(string $needle, int $min, int $max) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Check for Illegal Words. |
||
| 42 | * |
||
| 43 | * @param string $needle |
||
| 44 | * |
||
| 45 | * @return bool |
||
| 46 | */ |
||
| 47 | public function checkWords(string $needle): bool |
||
| 53 | } |
||
| 54 |