| 1 | <?php |
||
| 11 | class InitialMapper extends AbstractMapper |
||
| 12 | { |
||
| 13 | protected $matchLastPart = false; |
||
| 14 | |||
| 15 | public function __construct(bool $matchLastPart = false) |
||
| 16 | { |
||
| 17 | $this->matchLastPart = $matchLastPart; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * map intials in parts array |
||
| 22 | * |
||
| 23 | * @param array $parts the name parts |
||
| 24 | * @return array the mapped parts |
||
| 25 | */ |
||
| 26 | public function map(array $parts): array |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $part |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | protected function isInitial(string $part): bool |
||
| 61 | } |
||
| 62 |