|
Posted by Toby A Inkster on 07/18/07 12:14
Harrie Verveer wrote:
> Check out the discussion here: http://bugs.php.net/bug.php?id=34044
The comments on that page also include a rather nice way of implementing
friend classes yourself, though you may also want to overload __call().
Although a little more fiddly, the above method is arguably better than
C++'s. This is because with a little extra work you could define an
"acquaintance" class which is, say, the same as a friend class, but has
read-only access to object properties instead of read-write.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 27 days, 15:49.]
PHP Linkifier
http://tobyinkster.co.uk/blog/2007/07/18/linkify/
[Back to original message]
|