Re: [PATCH] Namespace Patch, Alpha 3

From: Date: Tue, 26 Jul 2005 21:26:21 +0000
Subject: Re: [PATCH] Namespace Patch, Alpha 3
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-17417@lists.php.net to get a copy of this message
Hello Alex, "Alex Kiesel" <alex@kiesel.name> wrote in message news:1122412467.4938.7.camel@boost.home.ahk... > > import $this is just something I'd expect PHP to be able to deal with - > but I could live without it. > I never meant to implement this, and I also agree with Marcus that there's no reason to allow it. > Btw, if you're saying "Namespaces are for spreading/controlling > responsibilities", do you mean something like the package access level > for methods and member variables Java has? Is anyone thinking of > introducing this? > Could you please clarify what you're referring to here? If you are talking about "package scope" for classes, this is already present in my patch. When inside a namespace, if you declare a class as "private class my_class", then that class will only be accessible from that namespace (even if the classes are spread out in several files, as long as they're in the same namespace, those classes can use the private class). Right now, I'm enforcing this by checking that the classes are both in the same directory. Once I finish my __autoload change, I'll have to instead check the namespace "prefixes" on both class names to allow flexibility. -- Jessie

« previous php.internals (#17417) next »