Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33982 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69739 invoked by uid 1010); 13 Dec 2007 00:54:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69723 invoked from network); 13 Dec 2007 00:54:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2007 00:54:31 -0000 X-Host-Fingerprint: 82.41.129.160 82-41-129-160.cable.ubr02.glen.blueyonder.co.uk Received: from [82.41.129.160] ([82.41.129.160:28355] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/D3-34780-6C280674 for ; Wed, 12 Dec 2007 19:54:30 -0500 Message-ID: To: internals@lists.php.net Date: Thu, 13 Dec 2007 00:54:13 +0000 Reply-To: nrixham@gmail.com User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 References: <47606C70.3050202@smashlabs.com> In-Reply-To: <47606C70.3050202@smashlabs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.41.129.160 Subject: Re: Namespace access modifiers From: nrixham@gmail.com (Nathan Rixham) Would this not do the same thing and perhaps be easier to implement: namespace Foo; protected $var; class Bar { } thus allowing use of private public protected before variables, and hell why not classes aswell. private = only methods, code, classes in namespace Foo have access protected = only methods, code, classes in namespace Foo or children Foo::Too have access public = everybody the same inheritance rules etc as classes.. makes sence :) and great idea! got my vote, especially with the braces in namespaces! namespace Foo; { protected $var; public class Extender { public function __construct() { ...... } } } Nathan Ralph Schindler wrote: > Since everyone is in the "namespace" frame of mind, is there a > possibility of a "namespace" access modifier? > > The way I envision this working is that if for example: > > namespace Foo; > > class Bar { > nsprotected $_someProperty = null; > } > > (or some other equivalent grammer) > > Would allow the property Foo::Bar::$_someProperty to be accessed from > any class that has implemented a class from the Foo namespace. > > Reaching for straws or is this a possibility? > > -ralph