Hello Ralph,
I don't think properties are the appropriate level to specify
namespace based access modifiers. I do think that a coarse-grained
access restriction on a class by class basis might be.
public class Foo {} // Default
private class Foo {}
(protected is meaningless because there is no inheritance for
namespaces.)
In principle, I like the idea of adding an access modifier for classes
to distinguish between a namespace's public interface and its private
features.
But, when do you check for access violations of class names? On use?
On new? What about esoteric things like reflection and the callback
pseudo-type? I just don't see how it could work in practice.
Best Regards,
Jeff
On Dec 12, 2007, at 6:19 PM, 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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php