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.
Why not? Private/protected is meant to separate APIs, it's not a security check on objects. Private means this API belongs to this class only, protected means this API belongs to this class and the children - i.e. to whoever develops this class further, but not to the clients. However, I see no reason to restrict class's code access to its own functions because the passed object is not $this.
--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com