Ohai,so Koichi suggested (via ticket ) we change AgaviResponse to subclass AgaviAttributeHolder. This way, custom stuff like info on what js/css files to include in the decorator can be set there, where it belongs, instead of on the global request object. This would, along the way, solve the dilemma where using request attributes for this would cause problems with caching as the state of it is always global to all containers - a slot instructed to include response attribs in the cache restores this info in its entirety, possibly restoring wrong info from a previous page cache where the slot was also used.
So far, life's good.But... How do we merge the attributes? If we do the obvious and array_merge() each attribute namespace separately, then the value of an attribute simply gets replaced - but we'd want e.g. an attribute "css", which would be an array, to be merged, and not replaced.
So... do we merge each attribute "by hand" and merge arrays, if we find them? Or do we leave it up to individual users to implement their merging behavior (I'd rather not, as the default implementation would be pretty useless). I assume merging by hand would not be too bad in terms of performance as the number of attributes is likely to stay very small.
Suggestions welcome. - David
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Agavi Dev Mailing List [email protected] http://lists.agavi.org/mailman/listinfo/dev
