| 1 | <?php |
||
| 7 | class FormatterCollection extends TypeCollection implements FormatterInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param string $text |
||
| 11 | * |
||
| 12 | * @return string |
||
| 13 | */ |
||
| 14 | 1 | public function format($text) |
|
| 15 | { |
||
| 16 | /** @var FormatterInterface $formatter */ |
||
| 17 | 1 | foreach ($this->toArray() as $formatter) { |
|
| 18 | 1 | $text = $formatter->format($text); |
|
| 19 | 1 | } |
|
| 20 | |||
| 21 | 1 | return $text; |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param $value |
||
| 26 | * |
||
| 27 | * @return bool |
||
| 28 | */ |
||
| 29 | 11 | public function acceptsType($value) |
|
| 33 | } |
||
| 34 |