Friend methods - is there a convention?
| From: | Brent Cook | Date: | Mon, 24 Jun 2002 16:37:14 +0000 |
| Subject: | Friend methods - is there a convention? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7329@lists.php.net to get a copy of this message | ||
Hi guys,
I'm working on a pair of classes. One embeds an instance of the other.
There are some methods of the embedded class that I would like to give
access to for the other. I marked these 'friend' methods as private in
PHPDoc, and preceded them with underscores, but it still seems strange to
have another $object->_privateMethod() in the outer class. How should I
define this friend relationship with PHP? Any sytactic or documentation
standards for this? Should I say @access friend to outerClass?
Thanks
- Brent