[development] namespaced global variables [WAS: Drupal 6.2 theme system standalone]

Adrian Rossouw adrian at bryght.com
Sat Jun 14 14:47:43 UTC 2008


On 14 Jun 2008, at 4:41 PM, Earnie Boyd wrote:

>
> Why should Bob do that when Drupal doesn't?  We need to take a stab  
> at using a $drupal static array that is controlled by a  
> drupal_register function.  If only one argument is passed then  
> drupal_register will return the value of the requested variable from  
> the $drupal static array.  Else all other arguments are stored as a  
> value of the variable and that stored value is then returned.  Note  
> that the first argument is always the associative index value for  
> the $drupal array.  If only two arguments are passed then the stored  
> value should only be the value of the second argument.  If more than  
> two arguments then the argument array is stored after the index  
> value is shifted off of the array.  I'm working up a patch for this.

drupal_get_context and drupal_set_context

there's been patches before, and there's patches in the queue still

Dries didn't like the idea when i floated it 5 years ago, but maybe  
it's time =)



More information about the development mailing list