Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Flash Messenger - implement session-based messages

boolean
$_messageAdded= 'false'
$_messageAdded - Wether a message has been previously added
false
Details
array
$_messages= 'array()'
$_messages - Messages from previous request
array()
Details
string
$_namespace= ''default''
$_namespace - Instance namespace, default is 'default'
'default'
Details
addMessage(
string $message
)
:
\Zend_Controller_Action_Helper_FlashMessenger
addMessage() - Add a message to flash message
Name | Type | Description |
---|---|---|
$message | string |
Type | Description |
---|---|
\Zend_Controller_Action_Helper_FlashMessenger | Provides a fluent interface |

clearCurrentMessages(
)
:
boolean
clear messages from the current request & current namespace
Type | Description |
---|---|
boolean |

clearMessages(
)
:
boolean
Clear all messages from the previous request & current namespace
Type | Description |
---|---|
boolean | True if messages were cleared, false if none existed |

direct(
string $message
)
:
void
Strategy pattern: proxy to addMessage()
Name | Type | Description |
---|---|---|
$message | string |

getCurrentMessages(
)
:
array
getCurrentMessages() - get messages that have been added to the current namespace within this request
Type | Description |
---|---|
array |

getIterator(
)
:
\ArrayObject
getIterator() - complete the IteratorAggregate interface, for iterating
Type | Description |
---|---|
\ArrayObject |

getMessages(
)
:
array
getMessages() - Get messages from a specific namespace
Type | Description |
---|---|
array |

hasCurrentMessages(
)
:
boolean
hasCurrentMessages() - check to see if messages have been added to current namespace within this request
Type | Description |
---|---|
boolean |

hasMessages(
)
:
boolean
hasMessages() - Wether a specific namespace has messages
Type | Description |
---|---|
boolean |

postDispatch(
)
:
\Zend_Controller_Action_Helper_FlashMessenger
postDispatch() - runs after action is dispatched, in this case, it is resetting the namespace in case we have forwarded to a different action, Flashmessage will be 'clean' (default namespace)
Type | Description |
---|---|
\Zend_Controller_Action_Helper_FlashMessenger | Provides a fluent interface |

resetNamespace(
)
:
\Zend_Controller_Action_Helper_FlashMessenger
resetNamespace() - reset the namespace to the default
Type | Description |
---|---|
\Zend_Controller_Action_Helper_FlashMessenger | Provides a fluent interface |

setNamespace(
string $namespace
=
'default'
)
:
\Zend_Controller_Action_Helper_FlashMessenger
setNamespace() - change the namespace messages are added to, useful for per action controller messaging between requests
Name | Type | Description |
---|---|---|
$namespace | string |
Type | Description |
---|---|
\Zend_Controller_Action_Helper_FlashMessenger | Provides a fluent interface |