Re: HTTP_client and listeners
| From: | Justin Patrin | Date: | Thu, 16 Feb 2006 05:02:14 +0000 |
| Subject: | Re: HTTP_client and listeners | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23002@lists.php.net to get a copy of this message | ||
On 2/15/06, Dan Rossi <pear@electroteque.org> wrote:
> Can somebody explain why the attached listener is required to extend
> HTTP_Request_Listener ??
>
> if (!is_a($listener, 'HTTP_Request_Listener')) {
> return false;
> }
>
>
> This kinda sucks as i cant attach the current class of $this or self to
> be the listener object and it obviouslly needs to extend that class.
> Generally listener objects dont require to extend the event dispatcher
> ??? As of now i cant send database connections to a method call like
> that. Any ideas ?
>
Likely it was a hack to make sure that you implemented the interface.
This *should* be done with an Interface.
--
Justin Patrin