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
array $_messages = 'array'
$_messages - Messages from previous request
string $_namespace = 'default'
$_namespace - Instance namespace, default is 'default'
Zend_Session $_session = 'null'
$_session - Zend_Session storage object
__construct(
)
:
void
__construct() - Instance constructor, needed to get iterators, etc
addMessage(
string $message
)
:
Zend_Controller_Action_Helper_FlashMessenger
addMessage() - Add a message to flash message
clearCurrentMessages(
)
:
boolean
clear messages from the current request & current namespace
clearMessages(
)
:
boolean
Clear all messages from the previous request & current namespace
count(
)
:
int
count() - Complete the countable interface
direct(
string $message
)
:
void
Strategy pattern: proxy to addMessage()
getCurrentMessages(
)
:
array
getCurrentMessages() - get messages that have been added to the current namespace within this request
getIterator(
)
:
ArrayObject
getIterator() - complete the IteratorAggregate interface, for iterating
getMessages(
)
:
array
getMessages() - Get messages from a specific namespace
hasCurrentMessages(
)
:
boolean
hasCurrentMessages() - check to see if messages have been added to current namespace within this request
hasMessages(
)
:
boolean
hasMessages() - Wether a specific namespace has messages
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)
resetNamespace(
)
:
Zend_Controller_Action_Helper_FlashMessenger
resetNamespace() - reset the namespace to the default
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