Hello Jeff, there is no way in implementing multi-whatever observer and subjects typesafe. If you want that you'd end up calling them MySubjectWhatever, MySubjectWhatnot, MySubjectWhatelse, ... and MyObserverWhatever, ... The other thing you mentioned, sending information along, is not necessary because you have access for what you really need, at least you can give the access yourself by your design and i strongly encourage you do so. The only thing that can be usefull sometimes is being able to prevent some observers from being notified. But that would require PHP dealing with optional parameters in its signature checking rules and i must admit that i couldn't get that to work.
regards marcus Tuesday, September 13, 2005, 7:07:47 AM, you wrote: > Would it be possible to remove the Subject and Observer interfaces or > at least delay them until a later release? > The problem with the Observer interface is that any class implementing > it is only capable of receiving one kind of notification (update) and > there is no capability to send any additional information. > The problem with the Subject interface is that it can also only support > one kind of observer. > Together these are harsh restrictions that would limit the use of these > interfaces to only the most trivial applications. These interfaces are > fine as a textbook example of the observer pattern, but I don't see > them as generally useful enough to have as part of the language. > Regards, > Jeff Moore Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php