Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17421 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49008 invoked by uid 1010); 27 Jul 2005 06:10:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 48993 invoked from network); 27 Jul 2005 06:10:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2005 06:10:09 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:47591] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id 24/95-58254-04527E24 for ; Wed, 27 Jul 2005 02:10:08 -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 97A6035C36E; Wed, 27 Jul 2005 08:27:47 +0200 (CEST) Date: Wed, 27 Jul 2005 08:10:12 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1763075030.20050727081012@marcus-boerger.de> To: Alex Kiesel Cc: Jessie Hernandez , internals@lists.php.net In-Reply-To: <1122414842.4938.13.camel@boost.home.ahk> References: <52.31.61486.E8DCDD24@pb1.pair.com> <1122328113.647.16.camel@boost.home.ahk> <538910800.20050725235918@marcus-boerger.de> <79.5B.58254.6DCA5E24@pb1.pair.com> <1374121835.20050726101045@marcus-boerger.de> <1122414842.4938.13.camel@boost.home.ahk> 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 Alex, Tuesday, July 26, 2005, 11:54:02 PM, you wrote: > On Tue, 2005-07-26 at 10:10 +0200, Marcus Boerger wrote: >> > I still think the namespace import behavior should be separate from the >> > __autoload function. Of course, this is just me. What does everyone else >> > think? I'd like to gather opinions on which is preferred. I will also like >> > to know if a separate class_path is preferred (as I have in my last patch) >> > or if just leaving include_path is what most prefer. >> >> None of the above makes any sense. Look __autoload() is just bein called at >> any place where a class is missing. So looking for the file first and then >> loading __autoload(I) makes no sense whatsoever. IMO what we need here is a >> default implementation for import behavior accomplished by __autoload(). So >> for example "import ns:cls;" leads to "__autoload('ns:cls')". Here the SPL >> default implementation would relpace all ':' with the directory divider '/' >> or '\', append '.inc' or '.php' or '.inc.php' and append the result to all >> directories in the include_path to look for the file. If were are to support >> import with '*' the the autoload implementation would need to take care of >> this and load all matching files. A user land implementation can easily >> achieve that by using SPLs (Recursive)DirectoryIterator and FilterIterator. > What are the options when having a PHP without SPL, then? That > __autoload invocation chain once in discussion hasn't yet been > implemented, right? The only differences would be that there won't be a fallback and that you won't be able to have more than one __autoload function. And SPL's implemenetation is that chain. Best regards, Marcus