Class Zend_Controller_Action_Helper_FlashMessenger

Description

Implements interfaces:

  • IteratorAggregate (internal interface)
  • Countable (internal interface)

Flash Messenger - implement session-based messages

Located in /Controller/Action/Helper/FlashMessenger.php (line 43)

Zend_Controller_Action_Helper_Abstract
   |
   --Zend_Controller_Action_Helper_FlashMessenger
Variable Summary
 static boolean $_messageAdded
 static array $_messages
 string $_namespace
Method Summary
Variables
static boolean $_messageAdded = false (line 64)

$_messageAdded - Wether a message has been previously added

  • access: protected
static array $_messages = array() (line 50)

$_messages - Messages from previous request

  • access: protected
static Zend_Session $_session = null (line 57)

$_session - Zend_Session storage object

  • access: protected
string $_namespace = 'default' (line 71)

$_namespace - Instance namespace, default is 'default'

  • access: protected

Inherited Variables

Inherited from Zend_Controller_Action_Helper_Abstract

Zend_Controller_Action_Helper_Abstract::$_actionController
Zend_Controller_Action_Helper_Abstract::$_frontController
Methods
Constructor __construct (line 79)

__construct() - Instance constructor, needed to get iterators, etc

  • access: public
void __construct (string $namespace)
  • string $namespace
addMessage (line 133)

addMessage() - Add a message to flash message

  • return: Provides a fluent interface
  • access: public
Zend_Controller_Action_Helper_FlashMessenger addMessage (string $message)
  • string $message
clearCurrentMessages (line 218)

clear messages from the current request & current namespace

  • access: public
boolean clearCurrentMessages ()
clearMessages (line 177)

Clear all messages from the previous request & current namespace

  • return: True if messages were cleared, false if none existed
  • access: public
boolean clearMessages ()
count (line 247)

count() - Complete the countable interface

  • access: public
int count ()

Implementation of:
Countable::count
direct (line 262)

Strategy pattern: proxy to addMessage()

  • access: public
void direct (string $message)
  • string $message
getCurrentMessages (line 204)

getCurrentMessages() - get messages that have been added to the current namespace within this request

  • access: public
array getCurrentMessages ()
getIterator (line 233)

getIterator() - complete the IteratorAggregate interface, for iterating

  • access: public
ArrayObject getIterator ()

Implementation of:
IteratorAggregate::getIterator
getMessages (line 163)

getMessages() - Get messages from a specific namespace

  • access: public
array getMessages ()
hasCurrentMessages (line 193)

hasCurrentMessages() - check to see if messages have been added to current namespace within this request

  • access: public
boolean hasCurrentMessages ()
hasMessages (line 153)

hasMessages() - Wether a specific namespace has messages

  • access: public
boolean hasMessages ()
postDispatch (line 97)

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)

  • return: Provides a fluent interface
  • access: public

Redefinition of:
Zend_Controller_Action_Helper_Abstract::postDispatch()
Hook into action controller postDispatch() workflow
resetNamespace (line 121)

resetNamespace() - reset the namespace to the default

  • return: Provides a fluent interface
  • access: public
setNamespace (line 110)

setNamespace() - change the namespace messages are added to, useful for per action controller messaging between requests

  • return: Provides a fluent interface
  • access: public
Zend_Controller_Action_Helper_FlashMessenger setNamespace ([string $namespace = 'default'])
  • string $namespace

Inherited Methods

Inherited From Zend_Controller_Action_Helper_Abstract

 Zend_Controller_Action_Helper_Abstract::getActionController()
 Zend_Controller_Action_Helper_Abstract::getFrontController()
 Zend_Controller_Action_Helper_Abstract::getName()
 Zend_Controller_Action_Helper_Abstract::getRequest()
 Zend_Controller_Action_Helper_Abstract::getResponse()
 Zend_Controller_Action_Helper_Abstract::init()
 Zend_Controller_Action_Helper_Abstract::postDispatch()
 Zend_Controller_Action_Helper_Abstract::preDispatch()
 Zend_Controller_Action_Helper_Abstract::setActionController()

Documentation generated on Mon, 21 Jun 2010 15:24:03 -0400 by phpDocumentor 1.4.3