Re: [PATCH] Namespace Patch, Beta 2
| From: | Jessie Hernandez | Date: | Tue, 09 Aug 2005 02:36:41 +0000 |
| Subject: | Re: [PATCH] Namespace Patch, Beta 2 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17646@lists.php.net to get a copy of this message | ||
Classes that had uppercase letters were not being handled properly in
namespace imports. The attached patch has this fix (thanks Maxx!). Also,
the attached patch includes the default behavior of resolving
simple-imported class names to their file paths (ns:class1 being looked up
as ns/class1(.inc or .inc.php).
I have a couple of questions, though:
1) I asked this before, but it wasn't answered: is there any reason why .php
is not a default extension for spl_autoload?
2) Right now, you have to use the autoload_import_class function for
namespace imports so that the class names are properly found. This function
can be eliminated if there was a way for me to get the last inserted
element in the class_table. Can I just simply call
zend_hash_internal_pointer_end_ex on class_table and get that end element,
assuming that this was the last element that was inserted? Or is the order
in which items are inserted into a hashtable undefined?
Regards,
Jessie
Attachment: [text/x-diff] ns_0808.patch
Attachment: [text/x-diff] ns_0808.patch