| 1 | <?php |
||
| 13 | abstract class HierarchicalEntityIdParser implements EntityIdParser { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var EntityIdParser |
||
| 17 | */ |
||
| 18 | private $baseIdParser; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * HierarchicalEntityIdParser constructor. |
||
| 22 | * |
||
| 23 | * @param EntityIdParser $baseIdParser |
||
| 24 | */ |
||
| 25 | public function __construct( EntityIdParser $baseIdParser ) { |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $idSerialization |
||
| 31 | * |
||
| 32 | * @throws EntityIdParsingException |
||
| 33 | * @return ItemId |
||
| 34 | */ |
||
| 35 | public function parse( $idSerialization ) { |
||
| 46 | |||
| 47 | protected abstract function newEntityId( EntityId $base, $relativePart ); |
||
| 48 | |||
| 49 | } |
||
| 50 |