Re: Alternatives for encapsulation when using composition instead of inheritance
| From: | Christoph M. Becker | Date: | Thu, 26 Aug 2021 14:20:00 +0000 |
| Subject: | Re: Alternatives for encapsulation when using composition instead of inheritance | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-115855@lists.php.net to get a copy of this message | ||
On 26.08.2021 at 15:47, Olle Härstedt wrote:
> * Friend classes, like in C++: Class B is annotated to be a friend of
> A, so class A can see the content of class B but no other class can.
<https://wiki.php.net/rfc/friend-classes> has
been declined.
> * Namespace private: Class A and B are defined in the same namespace,
> so they can see each other's properties that are defined as "internal"
<https://wiki.php.net/rfc/namespace-visibility>
appears to be inactive.
--
Christoph M. Becker