Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20961 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16751 invoked by uid 1010); 1 Dec 2005 16:42:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 16735 invoked from network); 1 Dec 2005 16:42:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Dec 2005 16:42:33 -0000 X-Host-Fingerprint: 194.109.253.196 mediawave.xs4all.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([194.109.253.196:38547] helo=mediawave.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 25/18-14828-6F72F834 for ; Thu, 01 Dec 2005 11:42:31 -0500 Received: from mediawave.nl (mediawave.nl [127.0.0.1]) by mediawave.nl (8.13.4/8.13.4) with ESMTP id jB1GgM8g030236 for ; Thu, 1 Dec 2005 17:42:22 +0100 Received: (from apache@localhost) by mediawave.nl (8.13.4/8.13.4/Submit) id jB1GgMmo030235; Thu, 1 Dec 2005 17:42:22 +0100 X-Authentication-Warning: mediawave.nl: apache set sender to bart@mediawave.nl using -f Received: from 137.224.252.10 (SquirrelMail authenticated user bart) by www.mediawave.nl with HTTP; Thu, 1 Dec 2005 17:42:22 +0100 (CET) Message-ID: <23057.137.224.252.10.1133455342.squirrel@www.mediawave.nl> Date: Thu, 1 Dec 2005 17:42:22 +0100 (CET) To: internals@lists.php.net User-Agent: SquirrelMail/1.4.6 [CVS]-0.cvs20050812.1.fc4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: Desired namespace behavoir From: bart@mediawave.nl ("Bart de Boer") > /* > * this encounters a namespace. The auto-prefix-import option > * is active so EVERYTHING is inside the namespace is imported > * with a prefix of "JessieStuff_". > */ > require 'JessiePackage.php'; > $x=new JessieStuff_SimpleClass(); So let's say we've got a package like this: namespace JessieStuff { class FirstClass { ... } class SecondClass { public $obj; function __construct() { $this->obj = new FirstClass(); } } } Now we'd import this with prefixing everything and the result would be something that acts like: class JessieStuff_FirstClass { ... } class JessieStuff_SecondClass { public $obj; function __construct() { $this->obj = new FirstClass(); } } Then, if I do: $x = new JessieStuff_SecondClass(); I'd get an error that 'FirstClass' can't be found. Because it's renamed to JessieStuff_FirstClass. Or do you suggest we replace all occurences of 'new ClassName()' to 'new JessieStuff_ClassName()' as well? Or do you suggest that everything that was inside the namespace is still able to call "internal" classes without using the namespace prefix? And your INI option only provides interface classes?