# Class visibility in namespaces

- Thread: https://externals.io/message/41546
- Original archive: https://news-web.php.net/php.internals/41546
- Started by Ron Rademaker on 2008-10-29T08:12:30+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #41546 — Ron Rademaker — 2008-10-29T08:12:30+00:00

URL: https://externals.io/message/41546#41546

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

---

## #41566 — Marcus Boerger — 2008-10-30T00:43:17+00:00

URL: https://externals.io/message/41546#41566 · In reply to: #41546

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
