Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18810 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55029 invoked by uid 1010); 13 Sep 2005 05:37:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55006 invoked from network); 13 Sep 2005 05:37:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2005 05:37:27 -0000 X-Host-Fingerprint: 80.91.229.2 main.gmane.org Linux 2.5 (sometimes 2.4) (4) Received: from ([80.91.229.2:46397] helo=ciao.gmane.org) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B8/3A-62395-59566234 for ; Tue, 13 Sep 2005 01:37:26 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EF3Sg-00053l-SG for internals@lists.php.net; Tue, 13 Sep 2005 07:36:06 +0200 Received: from p508851d8.dip.t-dialin.net ([80.136.81.216]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Sep 2005 07:36:06 +0200 Received: from sb by p508851d8.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Sep 2005 07:36:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Tue, 13 Sep 2005 07:35:38 +0200 Lines: 23 Message-ID: References: <253fbb6f28c5943cfce697c54ace09d0@procata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: p508851d8.dip.t-dialin.net User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <253fbb6f28c5943cfce697c54ace09d0@procata.com> Sender: news Subject: Re: [PHP-DEV] Subject and Observer Interfaces From: sb@sebastian-bergmann.de (Sebastian Bergmann) Jeff Moore schrieb: > 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. You can extend the interfaces interface MySubject extends Subject { } interface MyObserver extends Observer { } 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. -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69