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

Earnie Boyd earnie at users.sourceforge.net
Sat Jun 14 16:34:19 UTC 2008


Quoting Adrian Rossouw <adrian at bryght.com>:

>
> 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 =)
>
>

And there will be another patch at http://drupal.org/node/270538 once I 
upload the patch.  I have most of it coded already, just need to do 
some testing but don't have time to set that up yet.  Wife is having 
health issues and I'm having development delays because of that.

Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/



More information about the development mailing list