Yep, I agree with that. And coming from years of writing C++ I barely
used friends and it always seemed kind of hackish to me.
At 06:21 AM 1/11/2006, Ilia Alshanetsky wrote:
I think we should avoid complicating an already complex OO
functionality. Borrowing concepts from other languages is fine
Ilia Alshanetsky wrote:
I think we should avoid complicating an already complex OO
functionality. Borrowing concepts from other languages is fine, but to a
degree.
I think the PHP real world (not the guys porting Java APIs to PHP)
requires support binary only:
"public API"
"my break at any ti
I think we should avoid complicating an already complex OO
functionality. Borrowing concepts from other languages is fine, but to a
degree.
Ilia
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Derick Rethans schrieb:
> A second solution is:
> http://derickrethans.nl/private_properties_exposed.php
The mechanism above is emplyed by PHPUnit 3.0 to allow testing private
and protected properties.
--
Sebastian Bergmann http://www.sebastian-bergmann.de/
GnuPG Key: 0xB8
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
On Wed, 11 Jan 2006, Leon Matthews wrote:
> There is feature request on bugs.php.net (#34044) about this already, but no
> comments. Is there any support for this sort of thing out there?
If you only need friends for testing the contents of static properties,
then there are alternative ways. On
Leon Matthews wrote:
> Hi.
>
> I'm responsible for writing unit tests for our PHP projects at work.
>
> I would find C++ style friend classes really useful for getting at another
> class's private methods. Since we adopted PHP5 we have been using lots of
> private methods to clean our interfaces