Re: Desired namespace behavoir

From: Date: Wed, 30 Nov 2005 23:45:17 +0000
Subject: Re: Desired namespace behavoir
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-20924@lists.php.net to get a copy of this message
Hi Oliver, "Oliver Grätz" <oliver.graetz@arcor.de> wrote in message news:F3.86.14828.8833E834@pb1.pair.com... > Jessie Hernandez schrieb: > > In this case the FOO define will be used. When you do a namespace import, > > you can really only use classes without the namespace prefix (since > > __autoload exists). To reference a function name without the prefix, you > > must import it directly, as: > > > > import function A:::my_func; > > > > To have the same behavior for functions in namespace imports, a global > > __call function would need to be defined (this would serve as the > > "__autoload" for functions. > > Hi Jessie! > > First of all, what about the "import ... as ..." syntax? > This has been in the patch practically since day 1! import class ns:class1 as ns_class1; import function ns:func1 as ns_func1; > And then, I wrote about a "auto prefix simulation" mode. > This could give the prefix evangelists what they want without stopping > others from using namespaces. How would that fit in here? Or is this > suffering the same problems as here with only having > autoscope-functionality for classes? > Please explain what you mean. Regards, Jessie

« previous php.internals (#20924) next »