Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17348 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43713 invoked by uid 1010); 20 Jul 2005 18:35:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43698 invoked from network); 20 Jul 2005 18:35:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2005 18:35:55 -0000 X-Host-Fingerprint: 63.118.113.4 miami4.us.univision.com Received: from ([63.118.113.4:24128] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id E3/87-61486-A899ED24 for ; Wed, 20 Jul 2005 14:35:54 -0400 Message-ID: To: internals@lists.php.net References: <52.31.61486.E8DCDD24@pb1.pair.com> <681697173.20050720083643@marcus-boerger.de> Date: Wed, 20 Jul 2005 14:35:26 -0400 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Posted-By: 63.118.113.4 Subject: Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3 From: jrhernandez05@gmail.com ("Jessie Hernandez") "Marcus Boerger" wrote in message news:681697173.20050720083643@marcus-boerger.de... > Please don't add new ini settings here, living with include_path should be > enough, wouldn't it? > Do we want the import behavior to apply to the existing include path? To me, it seems nice to have the include_path and class_path separate. The class_path will only be used for classes, and include_path for everything else (header/footer code, etc.). Of course, this is just my opinion. What does everyone else think? > Why can't __autoload decide itself? I mean either it knows it received a > namespace class since the string contains a ':' or the function writer > has to find out himself. > Well, when a full namespace import is done, the string will not contain a ':'. __autoload would only receive a class name, and there is no easy way for __autoload to know which namespace contains that class. That's why a separate mechanism is needed from __autoload, that will look into the class_path directories (appending the directories for the namespace name) for the class file, and if/when found, include that. This is one other reason why a separate class_path variable would be useful: the include_path might have several directories, and all these would need to be searched, even though these directories might not have classes at all. In contrast, the directories in class_path are specifically for class files, so the searches are faster. -- Jessie