-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I started a scratch project with this patch and working with it seems
intuitive so far.
My only question at the moment is the following, however I guess it
isn't specific to your NS patch then to Dmitry's:
My current practice to declare an inter
Attached is a patch implementing my proposal.
Basically, when inside a namespace, you must reference global classes
using ::globalName or by having a "use ::globalName" statement. This
allows classes inside namespaces to have the same name as internal ones
without the need of explicitly "use"-
Dmitry,
As I mentioned, I did not find any significant performance penalty with
this patch. Also, the patch can be improved by not checking the
__get_namespace_classes function if we are not currently inside a namespace.
Either way, if we ignore namespace imports, then the best solution would
Hi Jessie,
The namespace may include several files and it may be extended with
additional files in any moment. So having single
__get_namespace_classes() function will require to update it every time
you extend namespace.
Also such function will significantly slowdown access to internal
cla
Attached is the proof-of-concept patch. If the idea is met well, then
I'll keep working on it to add caching and, if there's interest, I'll
add *namespace imports*.
An example of how a class in a namespace that's named the same as an
internal class can be loaded:
autoload.php
include_onc
Jessie Hernandez wrote:
> I just thought of something that might be a solution to the lookup rules
> that we currently have in the namespaces implementation. Whether it's
> good or not, I just wanted to throw it out there. Here goes:
>
> Support a user-defined function named __get_namespace_classe