Zend Framework: Flash Messenger, add a message from the model

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-03-15T15:21:32Z Indexed on 2010/03/16 23:11 UTC
Read the original article Hit count: 430

Filed under:

Any idea on how best to add a message to flash messenger from the model?

As FlashMessenger is an action helper, this seems not to be possible, so the obvious solution is to create an internal message object in the model, and return that to the controller from where you can use addMessage(). But if you want to return something else as well, this falls down.

Another idea is an additional session namespace for these internal messages, which is then merged in with the Flash Messenger namespace messages at output time?

Anyone have any thoughts or experience on this? Cheers.

© Stack Overflow or respective owner

Related posts about zend-framework