Greg Beaver wrote:
By definition, if you're accessing it from another class, then perhaps
it isn't "private" at all.
in C++ "friend" gives access to both "private" and "protected" ...
This can be more easily and intuitively
solved by using protected and CoderTest extends Coder,
given that PHP doesn't have multiple inheritance this just doesn't
work out all the time, so this would actually be an argument *for*
"friend" in PHP
or just making it
public and documenting in the code where it should and should not be used.
this argument can easily be extended to "don't use the PPP stuff at all"
"friend" on the other hand is a mechanism to allow more fine grained
access control
"friend" extends PPP in a similar way as ACLs extend the unix file
access control mechanisms "user/group/others" concept ...
--
Hartmut Holzgraefe, Senior Support Engineer .
MySQL AB, www.mysql.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php