| 1 | <?php |
||
| 7 | class StripKeysPunctuationTransformer implements TransformerInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | protected $punctuation; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $regex; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param array $punctuation |
||
| 21 | */ |
||
| 22 | 4 | public function __construct(array $punctuation = ['.', ',', ':', ';']) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @inheritdoc |
||
| 42 | */ |
||
| 43 | 4 | public function transform(ParameterBag $item) |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @param array $arr |
||
| 52 | */ |
||
| 53 | 4 | protected function stripKeysPunctuation(array &$arr) |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @param string $string |
||
| 70 | * |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | 4 | protected function strip($string) |
|
| 77 | } |
||
| 78 |