I think this would be great, personally. And if you really want to avoid name
clashes, just make a new HTTP_SESSION_VARS array (maybe
HTTP_SESSION_<namespace>_VARS?) for each namespace...
That solution would fit into the current model I think, Andrei´s worry about what overrides what importing an arbitrary namespace into the global one could be eleminated using some sort of a "namespace_order" like the "gpc_order" with simple options like "prevent_override" (which prevents variables to be overwritten in the global namespace, if special variables are needed with priority one could fetch them directly from "session_[namespace]_vars") and "allow_override" (which allow all existing variables to be overwritten) which can be set for every namespace...
example:
1. set global namespace "allow_override" (in .ini file or with set_option)
2. restore global with $var1,$var2,$var3
3. import Todo(namespace) with vars $var3,$var4 ($var3 will be overwritten, $var4 added)
4. EITHER set Todo(namespace) to "prevent_override" (complicated solution, one would have to keep track on which vars came from which namspace, best solution (TM) I think) OR set global namespace to "prevent_override" (simplest solution)
5. another dumb user imports another namespace with $var1-$var4 and these will not be overwritten by accident because all important vars are protected
the more complicated solution is in fact very much better, because one could then assign an overwriteability to every namespace without worrying about existing ones
in fact one could fetch all variables from "session_[namespace]_vars" in case of unsureness...
regards
--
o----------0-¬---------O-·---¬----o---®-----o o O ° .
| http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ °
·
0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ °
o © ° . ·
| psychedelic experience | gott@kiffen.de | O ° o °
o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·