Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32597 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63955 invoked by uid 1010); 3 Oct 2007 15:10:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 63940 invoked from network); 3 Oct 2007 15:10:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2007 15:10:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:55885] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/2C-23468-DE0B3074 for ; Wed, 03 Oct 2007 11:10:37 -0400 Received: from dhcp-172-28-204-225.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 40C0C1B3657; Wed, 3 Oct 2007 17:10:34 +0200 (CEST) Date: Wed, 3 Oct 2007 17:10:33 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1575776287.20071003171033@marcus-boerger.de> To: Benjamin Schulz CC: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] namespaces: import name conflicts with defined class From: helly@php.net (Marcus Boerger) Hello Benjamin, naive question: how do you define your exception which needs to onherit Exception? Are you doing this: class Exception extends ::exception { } ??? marcus p.s.: I think that is really ugly and actually sounds like replacing a core functionality... Tuesday, October 2, 2007, 1:56:04 PM, you wrote: > Hi all, > import Foo::Bar AS DomDocument; > import Foo::Exception; > import MyStuff::Dom::XsltProcessor; > Result in a "Fatal error: Import name '...' conflicts with defined > class" > Of course i want to refer to my own exception in my application or > framework as "Exception", and of course i want to use it without > prefixes (import myStuff::Exception AS MyStuffException), i wouldn't > use namespace otherwise (there is no other benefit, right?). > It's not that one accidentally puts an "import Foo::Exception" in his > file .. > Is there a good reason for this bevhaviour that i don't see? There is > still ::Exception to access the class in the global namespace. > regards, > Benjamin Best regards, Marcus