Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32886 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69462 invoked by uid 1010); 20 Oct 2007 21:55:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69443 invoked from network); 20 Oct 2007 21:55:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2007 21:55:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:24618] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/8A-03598-7397A174 for ; Sat, 20 Oct 2007 17:55:05 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 20 Oct 2007 23:55:01 +0200 Received: from [192.168.17.1] ([192.168.17.1]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Sat, 20 Oct 2007 14:54:57 -0700 Message-ID: <471A7932.9040707@zend.com> Date: Sat, 20 Oct 2007 14:54:58 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Chuck Hagenbuch CC: Gregory Beaver , internals@lists.php.net References: <20071019224202.20245u5zry52h5c8@technest.org> <47196F1A.80400@chiaraquartet.net> <471A6BC6.3090608@zend.com> <20071020172832.338919lgcfp4v1us@technest.org> In-Reply-To: <20071020172832.338919lgcfp4v1us@technest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Oct 2007 21:54:57.0569 (UTC) FILETIME=[DAECA110:01C81363] Subject: Re: [PHP-DEV] Re: Order of class resolution with namespaces and autoload From: stas@zend.com (Stanislav Malyshev) > Except that it makes it unclear what happens in _other_ files, which is In other files you specify what happens to other files. > even worse. Once you include the file above, any other file in the > Test:: namespace that throws an Exception will throw Test::Exception, > not Exception, even if it doesn't import Test::Exception. I'm afraid I don't understand. Regardless of what you include where, the name resolution for the file is defined by the code and imports in this file. Since that file does not define test::exception, it would not influence resolution of any file it is included in. > I think it makes much more sense to import classes that are _outside_ > the current namespace. Having to import pieces of your own namespace > makes namespaces less useful and intuitive. Import is just a way to write names shorter. Thus, you can employ it to achieve different goals. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com