1 | <?php |
||
9 | class StringFormatter extends AbstractFormatter |
||
10 | { |
||
11 | protected $trim = true; |
||
12 | protected $trimCharMask = " \t\n\r\0\x0B"; |
||
13 | |||
14 | 6 | public function __construct($formatter = null, $trim = true, $trimCharMask = null) |
|
24 | |||
25 | /** |
||
26 | * @param bool $trim |
||
27 | * |
||
28 | * @return StringFormatter |
||
29 | */ |
||
30 | 6 | public function setTrim($trim) |
|
36 | |||
37 | /** |
||
38 | * @param null|string $trimCharMask |
||
39 | * |
||
40 | * @return StringFormatter |
||
41 | */ |
||
42 | 1 | public function setTrimCharMask($trimCharMask) |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 3 | public function getTrimCharMask() |
|
56 | |||
57 | /** |
||
58 | * @return bool |
||
59 | */ |
||
60 | 4 | public function isTrim() |
|
64 | |||
65 | 4 | protected function getFormattedValue($value) |
|
73 | } |
||
74 |