| 1 | <?php |
||
| 18 | class Trim extends FilterRule |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string|null |
||
| 22 | */ |
||
| 23 | protected $characters; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Set characters to trim, if none are given, use the PHP default |
||
| 27 | * |
||
| 28 | * @param null|string $characters |
||
| 29 | */ |
||
| 30 | 22 | public function __construct($characters = null) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Trim the value, if no characters to trim are given, use the PHP default |
||
| 37 | * |
||
| 38 | * @param mixed $value |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 21 | public function filter($value) |
|
| 53 | } |
||
| 54 |