Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56330 invoked by uid 1010); 26 Jul 2005 18:59:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56315 invoked from network); 26 Jul 2005 18:59:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2005 18:59:50 -0000 X-Host-Fingerprint: 63.118.113.4 miami4.us.univision.com Received: from ([63.118.113.4:27899] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id 98/43-58254-62886E24 for ; Tue, 26 Jul 2005 14:59:50 -0400 Message-ID: <98.43.58254.62886E24@pb1.pair.com> To: internals@lists.php.net References: <52.31.61486.E8DCDD24@pb1.pair.com><1122328113.647.16.camel@boost.home.ahk> <34.C6.58254.4BD75E24@pb1.pair.com><1958582676.20050726092603@marcus-boerger.de> <42E5EE8C.3030609@innerfuse.biz> <03165207.20050726101137@marcus-boerger.de> Date: Tue, 26 Jul 2005 14:59:55 -0400 Lines: 47 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:03165207.20050726101137@marcus-boerger.de... > Hello Weyert, > > Tuesday, July 26, 2005, 10:04:28 AM, you wrote: > > > Hello, > > > How can I use the namespaces support, in such way that I can use with my > > coding guideline? > > > interfaces -> interface.NAME.inc.php > > classes -> class.NAME.inc.php > > > It doesn't seem it's possible now, because it's hard coded against > > NAME.php. Oh well, I might will have > > a look at it, and try to come with some workable, with support for > > nameless namespaces, etc. > > > I have the same probelm and don't see any reason in a hard coded > naming scheme unless be it a default fallback. Look at my other > reply. > > Best regards, > Marcus Based on what I see above, there appears to be several users which do not follow the PEAR file naming convention for their own classes. In order to have flexibility in this area, we are forced to let __autoload handle the include logic. I will post a patch in a few days with this change (as a result, my patch will be much smaller). I will also add the namespace import logic as described in my other post. Basically, the user will be responsible for all importing behavior in __autoload. In order for namespace imports to work correctly, an additional parameter needs to be passed to __autoload that will contain an array of imported namespaces from the file that triggered the __autoload call. Does anyone see any problems with this additional argument? This argument would only be passed if the class name does not contain a colon (meaning that the class could *possibly* reside under one of these namespaces). -- Jessie