1 | <?php |
||
8 | class SuffixMapper extends AbstractMapper |
||
9 | { |
||
10 | protected $suffixes = []; |
||
11 | |||
12 | protected $matchSinglePart = false; |
||
13 | |||
14 | protected $reservedParts = 2; |
||
15 | |||
16 | public function __construct(array $suffixes, bool $matchSinglePart = false, int $reservedParts = 2) |
||
22 | |||
23 | /** |
||
24 | * map suffixes in the parts array |
||
25 | * |
||
26 | * @param array $parts the name parts |
||
27 | * @return array the mapped parts |
||
28 | */ |
||
29 | public function map(array $parts): array |
||
50 | |||
51 | /** |
||
52 | * @param $parts |
||
53 | * @return bool |
||
54 | */ |
||
55 | protected function isMatchingSinglePart($parts): bool |
||
67 | |||
68 | /** |
||
69 | * @param $part |
||
70 | * @return bool |
||
71 | */ |
||
72 | protected function isSuffix($part): bool |
||
80 | } |
||
81 |