Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] Class visibility in namespaces

Posted by Ron Rademaker 
Ron Rademaker
[PHP-DEV] Class visibility in namespaces
October 29, 2008 09:15AM
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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Marcus Boerger
Re: [PHP-DEV] Class visibility in namespaces
October 30, 2008 01:50AM
Hello Ron,

we agreed long ago on a very easy scheme, there shall only be is-a and
public classes.

marcus

Wednesday, October 29, 2008, 9:12:30 AM, you wrote:

> 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




Best regards,
Marcus


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login