Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32883 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55763 invoked by uid 1010); 20 Oct 2007 21:02:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55748 invoked from network); 20 Oct 2007 21:02:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2007 21:02:28 -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:13686] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/48-03598-10C6A174 for ; Sat, 20 Oct 2007 17:02:27 -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 22:57:44 +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 13:57:41 -0700 Message-ID: <471A6BC6.3090608@zend.com> Date: Sat, 20 Oct 2007 13:57:42 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Gregory Beaver CC: Chuck Hagenbuch , internals@lists.php.net References: <20071019224202.20245u5zry52h5c8@technest.org> <47196F1A.80400@chiaraquartet.net> In-Reply-To: <47196F1A.80400@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Oct 2007 20:57:41.0203 (UTC) FILETIME=[DAB0CA30:01C8135B] Subject: Re: [PHP-DEV] Re: Order of class resolution with namespaces and autoload From: stas@zend.com (Stanislav Malyshev) > namespace Test; > // explicitly tell PHP that we want Test::Exception to be autoloaded (in > essence) > import Test::Exception; > > class Tester { > public function fail() { > throw new Exception(); > } > } > ?> This is even better than requiring, and makes the intent very clear. I don't think it decreases intuitiveness, on the contrary - from the look of the code it is immediately clear which exception would be used. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com