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 |

getActionController(
)
:
\Zend_Controller_Action
Retrieve current action controller
Inherited from: \Zend_Controller_Action_Helper_Abstract::getActionController()Type | Description |
---|---|
\Zend_Controller_Action |

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

getFrontController(
)
:
\Zend_Controller_Front
Retrieve front controller instance
Inherited from: \Zend_Controller_Action_Helper_Abstract::getFrontController()Type | Description |
---|---|
\Zend_Controller_Front |

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

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

getName(
)
:
string
getName()
Inherited from: \Zend_Controller_Action_Helper_Abstract::getName()Type | Description |
---|---|
string |

getRequest(
)
:
\Zend_Controller_Request_Abstract
getRequest() -
Inherited from: \Zend_Controller_Action_Helper_Abstract::getRequest()Type | Description |
---|---|
\Zend_Controller_Request_Abstract | $request |

getResponse(
)
:
\Zend_Controller_Response_Abstract
getResponse() -
Inherited from: \Zend_Controller_Action_Helper_Abstract::getResponse()Type | Description |
---|---|
\Zend_Controller_Response_Abstract | $response |

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 |

init(
)
:
void
Hook into action controller initialization
Inherited from: \Zend_Controller_Action_Helper_Abstract::init()
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 |

preDispatch(
)
:
void
Hook into action controller preDispatch() workflow
Inherited from: \Zend_Controller_Action_Helper_Abstract::preDispatch()
resetNamespace(
)
:
\Zend_Controller_Action_Helper_FlashMessenger
resetNamespace() - reset the namespace to the default
Type | Description |
---|---|
\Zend_Controller_Action_Helper_FlashMessenger | Provides a fluent interface |

setActionController(
\Zend_Controller_Action $actionController
=
null
)
:
\Zend_Controller_ActionHelper_Abstract
setActionController()
Inherited from: \Zend_Controller_Action_Helper_Abstract::setActionController()Name | Type | Description |
---|---|---|
$actionController | \Zend_Controller_Action |
Type | Description |
---|---|
\Zend_Controller_ActionHelper_Abstract | 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 |