Map is already too complicated
Initially Map was a Getter/Setter supposed to act as a usual map (i.e. set/get by key, see https://github.com/openzipkin/zipkin-php/blob/master/src/Zipkin/Propagation/Map.php), unfortunately I also promoted its use for HTTP headers (for things like Symfony) and that is how Map also supported case insensitiviness and array access.
Nowadays the lesson learnt is that each different Getter/Setter format deserve its own implementation rather than trying to reuse Map and hence to not add crap into existing abstractions. We can't change Map to be simpler now but we can create a very simple class for a truly simple map and use for the messaging abstraction (and deprecate Map), not sure how to call it tho:
- SimpleMap
- Array
- ?
Any idea @adriancole @anuraaga
Some other ideas
PropagationMap (we are creating the Map used for propagation FWIU)
StringMap
StringArray (no clue if Map or Array is clearer in PHP)
I would not combine the two honestly, unless it is usual to do that. just make a subtype of getter/setter which gets the point across?