Enumerate, Document & implement Appended vs. Overwritten Hook vars.
StephenGWills - October 24, 2007 - 15:26
| Project: | Omniture Integration |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
I started this thread to identify which s.vars can be over written by other modules and which ones we need to preserve and allow other modules to only append to.
examples: s.pagename should be a single thing and in Drupal is last mod executed wins.
s.events, however, really needs to aggregate all events that any module want to heap on the stack.
I guess my question is, do we insist that module writers assume responsibility for not clobbering s.events?
Or do we shepard this process by detecting s.event additions on return from module_invoke_all and post
process the array the MIA returns to us?

#1
Oooh - very interesting point.
Drupal will often pass along a variable in the module_invoke_all and expect the hooks to "do the right thing" with the data. That seems fine to me.
If we could have a definition of what we felt was right as a guidance then that would be even better. Can you enumerate any more of these?
#2
Need a better list of which variables can be altered, which cannot, and which should allow modules to append.