On 3/26/08, Richard Quadling <[EMAIL PROTECTED]> wrote:

>  It just doesn't seem right to be able to call a private or protected
>  method of another instance. Sort of isn't private any more.

>  And as for being able to call a protected method of a completely
>  different class, just because it shares the same ancestry. That seems
>  REALLY wrong.

it is needed for operations on several instances of the same class-hierarchy.

"private" means, that you are the author of the class and you know
what you are doing with instances of this class, but you do not want
to export that inner-functionality.

use case for "protected" is similiar, but relates to cases when you
have hierarchy of classes, which still have some common functionality,
which might be usable for multi-instance operations

-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to