You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #174 is merged, the DimensionContentCollection class will be one of the main classes of the bundle. Because of this, I think it is important to keep the class simple and consistent. Therefore I would propose the following changes:
a) The DimensionContentCollection should not extend \Traversable or \Countable. This makes the implementation of the class more complicated without improving DX. As a developer, I would expect a getDimensionContents method that returns an array of DimensionContents.
After #174 is merged, the
DimensionContentCollection
class will be one of the main classes of the bundle. Because of this, I think it is important to keep the class simple and consistent. Therefore I would propose the following changes:a) The
DimensionContentCollection
should not extend\Traversable
or\Countable
. This makes the implementation of the class more complicated without improving DX. As a developer, I would expect agetDimensionContents
method that returns an array ofDimensionContent
s.b) Remove the
getUnlocalizedDimensionContent
method andgetLocalizedDimensionContent
method. To keep things flexible, all services should use thegetDimensionContent
method with a respectivedimensionAttributes
parameter (see Adjust interface of services to accept locale instead of dimensionAttributes array #84 (comment)). By removing the methods, we force our services to consistently handle thedimensionAttributes
parameter. (fixed in Pass DimensionContentCollection to DataMapper services #182)After these changes, the
DimensionContentCollectionInterface
should look something like this:The text was updated successfully, but these errors were encountered: