| 1 | <?php |
||
| 8 | class SuffixMapper extends AbstractMapper |
||
| 9 | { |
||
| 10 | protected $suffixes = []; |
||
| 11 | |||
| 12 | protected $matchSinglePart = false; |
||
| 13 | |||
| 14 | public function __construct(array $suffixes, bool $matchSinglePart = false) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * map suffixes in the parts array |
||
| 22 | * |
||
| 23 | * @param array $parts the name parts |
||
| 24 | * @return array the mapped parts |
||
| 25 | */ |
||
| 26 | public function map(array $parts): array |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param $parts |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | protected function isMatchingSinglePart($parts): bool |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @param $part |
||
| 67 | * @return bool |
||
| 68 | */ |
||
| 69 | protected function isSuffix($part): bool |
||
| 77 | } |
||
| 78 |