[EMAIL PROTECTED] (Marcus Börger) wrote: > Not really. An interface simply describes a protocol subset that must be part > of the implementing class's protocol. In that it makes no sense to allow final > or private methods in an interface but still a protected member in an interface > would describe a subset of a protocol. And hence it would describe a method > that must be available with protected or public visibility. Or in other words > it would make it possible to hide a method per default from outside. > > "A derived class must implement it but other classes are not supposed to use > it" > > I came across this when i experimened with __clone.
I don't know what you experienced with __clone exactly, but maybe you wanted the class to allow accesses only from instances that have the same interface as the one being invoked. If so, my suggestion is to let those methods take a parameter that holds a caller instance and filter the accesses to it by the condition applying "instanceof" operator to that instance. p.s. A predefined variable like "$that" which indicates the caller instance would be what you want? Moriyoshi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php