Re: Namespace issues

From: Date: Fri, 17 May 2002 07:56:44 +0000
Subject: Re: Namespace issues
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6183@lists.php.net to get a copy of this message
On Fri, 17 May 2002 07:40:57 +0200, Kristian Koehntopp wrote: >On Fri, May 17, 2002 at 12:32:04AM +0200, Stig S. Bakken wrote: >> Next, the default "int-htdoc" location must be specified in PEAR_Config, >> for example as a sprintf format string ala "internal-pear/%s" (relative >> to document root). It has to be there because the installer needs to >> know where to install the int-htdoc files. (Moving them while still >> keeping things plug-and-play is not trivial.) >> >> How the "app-htdoc" files are treated depends a bit on how the Apache >> integration would be. So far I've been toying with the idea of letting >> people choose between a vhost or subdir-based setup. > >Ok, how do I get these values in my class, i.e. code example? There is no code for that right now, so chances are fairly small that you'll see a ready-to-run example :-). >> > 4. Namespace in Sessions and in GLOBALS >> > >> > How do we handle namespace issues in sessions? When a PEAR >> > class wants to use variables that have to become of the session, >> > or of the global namespace, what names do we reserve here? >> > >> > Again, I propose internal_pear_<classname> for use by PEAR. >> > >> > What are your opinions on this? >> >> Namespacing for $GLOBALS is already documented and widely used: >> >> _<package>_<variable> >> >> http://pear.php.net/manual/en/standards.naming.php > >Is this useful and consistent? I'd rather see >_pear_<package>_<variable> here, but ... If we go on and use _pear_<package> for GPC vars, it would in fact break consistency here. I prefer _pear_<package> for both cases btw. - Martin -- Martin Jansen, <mail@martin-jansen.de> http://www.martin-jansen.de/

« previous php.pear.dev (#6183) next »