Re: Subject/Observer design pattern in PEAR
| From: | Michael Wallner | Date: | Thu, 22 Jul 2004 09:11:10 +0000 |
| Subject: | Re: Subject/Observer design pattern in PEAR | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32239@lists.php.net to get a copy of this message | ||
Hi Heino H. Gehlsen, you wrote:
> http://pear.php.net/pepr/pepr-proposal-show.php?id=125
Uhm...
Why this "Util" prefix?
If you'd use ClassHints you could strip most of the throw
statements. Even the need to extend a class to implement
the observable pattern limits way too much in my opinion.
I'd much more appreciate the commonly used API for observers:
interface Observable {
public function attach[Observer](Observer $Observer);
public function detach[Observer](Observer $Observer);
public function notify($Note);
}
Sorry, but over all I'm not very happy with this implementation.
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc