Description
Currently $attributes is a mix of ImmutableArray via arr() and array[].
- Standardise it so it's a value object class of it's own, probably
tempest\view\attributes - TBD.
- Provide a courtesy rector script to re-type it from
ImmutableArray in dev apps to the new type.
- Consider what API it needs to implement, either have it implement
ArrayInterface for first party implementation of methods, or simply use the functions as needed; it should implement a with mapping to removeKeysExcept and without mapping to removeKeys, as well as a mapping to filter and any other methods required within tempest/view usage, probably map, each and a couple of obvious ones.
- Implement any additional custom methods to move handling of the $attributes array within the value object class itself.
Description
Currently $attributes is a mix of
ImmutableArrayviaarr()andarray[].tempest\view\attributes- TBD.ImmutableArrayin dev apps to the new type.ArrayInterfacefor first party implementation of methods, or simply use the functions as needed; it should implement awithmapping toremoveKeysExceptandwithoutmapping toremoveKeys, as well as a mapping tofilterand any other methods required withintempest/viewusage, probablymap,eachand a couple of obvious ones.