[dev] Notification question

Hans Lellelid hans at appliedsec.com
Fri Jan 10 13:41:20 PST 2003


Chuck Hagenbuch wrote:

>Quoting Jon Parise <jon at horde.org>:
>
>  
>
>>I don't think it's that excessive.  It's fairly literate, actually.
>>I suppose the common use case could always be shorted to:
>>
>>$event = new Notification_Event(_("Your password was updated
>>successfully."));
>>$notification->push($event, 'horde.success');
>>    
>>
>
>I was actually thinking that push() would transparently create a
>Notification_Event object if it was passed a string.
>
Ok -- cool.

On thinking it over (and comparing w/ other systems out there) I agree 
w/ Jon that doing something like

$notification->push(new Notification_Event(_("Message")), 'horde.success');

would not be so bad at all, but for the sake of backwards compatibility, 
having push accept a string and create an object seems like a good move. 
 Maybe future version of Horde could require $message param to be an 
object -- though still I like the simplicity of passing strings.

I'm interested in implementing this.  I can update existing listeners 
and create some abstract- / generic-case class for the 
Notification_Event.  What's procedure re: submitting code?

Thanks,
Hans


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4461 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.horde.org/archives/dev/attachments/20030110/70a7b854/smime.bin


More information about the dev mailing list