On Sep 13, 2005, at 1:35 AM, Sebastian Bergmann wrote:

 You can extend the interfaces ...
and adapt them to your needs while retaining the possibility to use them with other code that only knows about the original Subject and Observer
 interfaces.

Actually you can't and still be typesafe. If I extend Observer and add a changed() method, I cannot pass that new object to a standard Subject interface because that interface has no business calling the changed() method since its not on the base Observer interface that it specified. There are other problems. The two interfaces are tightly coupled and extensions are not interoperable and thats why I think they aren't generic enough to be a standard base class in PHP.

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

Reply via email to