Re: Class Friendship in PHP
| From: | xn--franois | Date: | Tue, 08 Dec 2015 11:17:23 +0000 |
| Subject: | Re: Class Friendship in PHP | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89739@lists.php.net to get a copy of this message | ||
Hi,
----- Mail original -----
> De: "Dustin Wheeler" <mdwheele@ncsu.edu>
> friendship protect the original class from unwarranted access. The
> common
> expression of these properties is something like: "Just because I
> grant you
> friendship access to me doesn’t automatically grant your kids access
> to me,
> doesn’t automatically grant your friends access to me, and doesn’t
> automatically grant me access to you." In essense, it is actually a
> very-safe feature and while it can be abused, surely, I wouldn't go
> as far
> to call it very dangerous. I have seen some pretty heinous usage of
> traits,
> but I won't condemn the feature as dangerous! :)
For inheritance rules, you may be interested by a small article I wrote on the subject
(http://tekwire.net/joomla/projects/ideas/php-friend).
Regards
François