Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17412 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64580 invoked by uid 1010); 26 Jul 2005 19:08:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64543 invoked from network); 26 Jul 2005 19:08:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2005 19:08:48 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:39866] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id 61/24-58254-93A86E24 for ; Tue, 26 Jul 2005 15:08:42 -0400 Received: from [192.168.1.3] (dsl-082-083-252-245.arcor-ip.net [82.83.252.245]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id EC98B35C36E; Tue, 26 Jul 2005 21:26:16 +0200 (CEST) Date: Tue, 26 Jul 2005 21:08:44 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1178274906.20050726210844@marcus-boerger.de> To: Jessie Hernandez Cc: internals@lists.php.net In-Reply-To: <98.43.58254.62886E24@pb1.pair.com> 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> <98.43.58254.62886E24@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3 From: helly@php.net (Marcus Boerger) Hello Jessie, Tuesday, July 26, 2005, 8:59:55 PM, you wrote: > "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). Yes you cannot simply change signatures of internal functions. And also you don't need to since you can easily provide a helper function(s) or you can give direct access to the list itself. Best regards, Marcus