I am working on a patch to provide a drupal_register function that will allow all variables to be namespaced. Initial patch will be forthcoming in a couple of weeks. Let me know if you think a different name should be used but tell me what you think it should be. I'm also toying with adding a active_namespace function to set and reset the namespace for the drupal_register function. However the namespace can be set by just doing drupal_register('namespace', 'foo'); but active_namespace('foo') will return the previous value of the namespace instead of the array $foo.

Comments

mdupont’s picture

Status: Active » Closed (duplicate)

Improvements to the Variable API are discussed on #1124198: DX: Finally implement revised Variable API in core.