Is it possible or How can i give a type to a FlashMessage in Zend?
For example
/* This is a \"Success\" message */
$this -> _helper -> FlashMesseng
Method signatures in Zend Framework 1.12.x for FlashMessenger:
public function addMessage($message, $namespace = null)
public function getMessages($namespace = null)
public function hasMessages($namespace = null)
public function clearMessages($namespace = null)
So to set messages the following will work:
/* success message */
$this->_helper->flashMessenger()->addMessage('Post created!', 'success');
/* error message */
$this->_helper->flashMessenger()->addMessage('You have no permissions', 'error');
And for the view, the following should work:
hasMessages('success')): ?>
hasMessages('error')): ?>