| 1 | <?php |
||
| 20 | class Strlen extends AbstractStrlen |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * |
||
| 24 | * Sanitizes a string to an exact length 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 $len The string length. |
||
| 31 | * |
||
| 32 | * @param string $pad_string Pad using this string. |
||
| 33 | * |
||
| 34 | * @param int $pad_type A `STR_PAD_*` constant. |
||
| 35 | * |
||
| 36 | * @return bool True if the value was sanitized, false if not. |
||
| 37 | * |
||
| 38 | */ |
||
| 39 | 9 | public function __invoke($subject, $field, $len, $pad_string = ' ', $pad_type = STR_PAD_RIGHT) |
|
| 53 | } |
||
| 54 |