Class visibility in namespaces
| From: | Ron Rademaker | Date: | Wed, 29 Oct 2008 08:12:30 +0000 |
| Subject: | Class visibility in namespaces | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-41546@lists.php.net to get a copy of this message | ||
Hi,
I'm hoping I don't cause yet another flame war about the n-word ;)
I was wondering if namespaces are going to support class visibility, and if no, would it be worth considering adding that feature? What I mean exacty is:
In namespace Foo:
public class Foo { }
protected class Bar { }
- Bar can be instantiated from any class (or function) within the namespace Foo
Outside of namespace Foo:
- class Foo in namespace Foo can be instantiated
- class Bar in namespace Foo can't be instantiated
Ron