1 | <?php |
||
14 | class PrefixMappingEntityIdParserFactory { |
||
15 | |||
16 | /** |
||
17 | * @var string[] |
||
18 | */ |
||
19 | private $idPrefixMapping; |
||
20 | |||
21 | /** |
||
22 | * @var EntityIdParser |
||
23 | */ |
||
24 | private $parser; |
||
25 | |||
26 | /** |
||
27 | * @param EntityIdParser $parser |
||
28 | * @param array $idPrefixMapping An associative array mapping repository names (strings) to id serialization |
||
29 | * prefix mappings specific to the particular repository (@see PrefixMappingEntityIdParser). |
||
30 | * If an empty-string key is provided in the mapping for some repository, its value must be the same |
||
31 | * as the repository name. |
||
32 | * |
||
33 | * @throws ParameterAssertionException |
||
34 | */ |
||
35 | public function __construct( EntityIdParser $parser, array $idPrefixMapping ) { |
||
60 | |||
61 | /** |
||
62 | * Create a PrefixMappingEntityIdParser for the particular repository using id prefix mappings |
||
63 | * defined in the constructor. |
||
64 | * |
||
65 | * @param string $repository |
||
66 | * |
||
67 | * @return PrefixMappingEntityIdParser |
||
68 | * @throws ParameterAssertionException |
||
69 | */ |
||
70 | public function getIdParser( $repository ) { |
||
79 | |||
80 | } |
||
81 |