1 | <?php |
||
20 | class StrlenBetween extends AbstractStrlen |
||
21 | { |
||
22 | /** |
||
23 | * |
||
24 | * Sanitizes a string to a length range by padding or chopping it. |
||
25 | * |
||
26 | * @param object $subject The subject to be filtered. |
||
27 | * |
||
28 | * @param string $field The subject field name. |
||
29 | * |
||
30 | * @param int $min The minimum length. |
||
31 | * |
||
32 | * @param int $max The maximum length. |
||
33 | * |
||
34 | * @param string $pad_string Pad using this string. |
||
35 | * |
||
36 | * @param int $pad_type A `STR_PAD_*` constant. |
||
37 | * |
||
38 | * @return bool True if the value was sanitized, false if not. |
||
39 | * |
||
40 | */ |
||
41 | 13 | public function __invoke($subject, $field, $min, $max, $pad_string = ' ', $pad_type = STR_PAD_RIGHT) |
|
55 | } |
||
56 |