Re: AW: [PHP-DEV] Namespace resolution
| From: | David Zülke | Date: | Wed, 12 Dec 2007 00:11:06 +0000 |
| Subject: | Re: AW: [PHP-DEV] Namespace resolution | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33952@lists.php.net to get a copy of this message | ||
Am 12.12.2007 um 01:02 schrieb Stanislav Malyshev:
Stas, please. It is preventing disk access in case the file to be loaded is not from my namespace. If it is from my namespace, and I as an autoloader was called, what am I gonna do? require() it of course, what else? My point was that if you have ten autoloaders registered, and the first nine of them cannot autoload the class, those nine disk accesses can be prevented by checking at least the namespace. - DavidLook. If you have an autoloader for Your::Namespace, then you just need to check if the class name (which is fully qualified, with the entire namespace prefix in the name) starts with "Your::Namespace" to prevent disk access.How this prevents disk access, I don't understand? So, it does start with Your::Namespace, how now it is going to prevent disk access?