1 | <?php |
||
9 | class StringNormalizer extends AbstractNormalizer |
||
10 | { |
||
11 | /** @var bool */ |
||
12 | protected $trim; |
||
13 | /** @var string */ |
||
14 | protected $trimCharMask; |
||
15 | |||
16 | 3 | public function __construct($normalizer = null, $trim = true, $trimCharMask = " \t\n\r\0\x0B") |
|
23 | |||
24 | /** |
||
25 | * @param bool $trim |
||
26 | * |
||
27 | * @return StringNormalizer |
||
28 | */ |
||
29 | 3 | public function setTrim($trim) |
|
35 | |||
36 | /** |
||
37 | * @param null|string $trimCharMask |
||
38 | * |
||
39 | * @return StringNormalizer |
||
40 | */ |
||
41 | 3 | public function setTrimCharMask($trimCharMask) |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | 2 | public function getTrimCharMask() |
|
55 | |||
56 | /** |
||
57 | * @return bool |
||
58 | */ |
||
59 | 3 | public function shouldTrim() |
|
63 | |||
64 | 3 | protected function getNormalizedValue($value) |
|
72 | } |
||
73 |