Re: Re: Is it possible to create a global namespace alias?
| From: | David Harkness | Date: | Tue, 05 Oct 2010 16:07:10 +0000 |
| Subject: | Re: Re: Is it possible to create a global namespace alias? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-308479@lists.php.net to get a copy of this message | ||
On Tue, Oct 5, 2010 at 8:41 AM, Matt Palermo <palermomatt@gmail.com> wrote:
> I'm assuming there is no way to make a global alias. Can anyone
> confirm/deny this?
>
I reread the documentation on namespaces, and from what I can tell this is
no way to do it. Each file maintains its own active namespace *at compile
time*. This means you can't even get around it with eval() or including
another script to set it.
I can't say I'm positive someone won't find a way around it, but short of an
extension I don't see one.
David