API Documentation

Zend/Controller/Action/Helper/FlashMessenger.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Controller  
Subpackage
Zend_Controller_Action_Helper  

\Zend_Controller_Action_Helper_FlashMessenger

Package: Zend\Controller\Zend\Controller\Action\Helper

Flash Messenger - implement session-based messages

Implements
Parent(s)
\Zend_Controller_Action_Helper_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
\Zend_Controller_Action_Helper_Abstract  
Version
$Id: FlashMessenger.php 24594 2012-01-05 21:27:01Z matthew $  

Properties

Propertyprotectedboolean  $_messageAdded= 'false'
static

$_messageAdded - Wether a message has been previously added

Default valuefalseDetails
Type
boolean
Propertyprotectedarray  $_messages= 'array()'
static

$_messages - Messages from previous request

Default valuearray()Details
Type
array
Propertyprotectedstring  $_namespace= ''default''

$_namespace - Instance namespace, default is 'default'

Default value'default'Details
Type
string
Propertyprotected\Zend_Session  $_session= 'null'
static

$_session - Zend_Session storage object

Default valuenullDetails
Type
\Zend_Session

Methods

methodpublic__construct( ) : void

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

methodpublicaddMessage( string $message ) : \Zend_Controller_Action_Helper_FlashMessenger

addMessage() - Add a message to flash message

Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
methodpublicclearCurrentMessages( ) : boolean

clear messages from the current request & current namespace

Returns
Type Description
boolean
methodpublicclearMessages( ) : boolean

Clear all messages from the previous request & current namespace

Returns
Type Description
boolean True if messages were cleared, false if none existed
methodpubliccount( ) : int

count() - Complete the countable interface

Returns
Type Description
int
methodpublicdirect( string $message ) : void

Strategy pattern: proxy to addMessage()

Parameters
Name Type Description
$message string
methodpublicgetCurrentMessages( ) : array

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

Returns
Type Description
array
methodpublicgetIterator( ) : \ArrayObject

getIterator() - complete the IteratorAggregate interface, for iterating

Returns
Type Description
\ArrayObject
methodpublicgetMessages( ) : array

getMessages() - Get messages from a specific namespace

Returns
Type Description
array
methodpublichasCurrentMessages( ) : boolean

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

Returns
Type Description
boolean
methodpublichasMessages( ) : boolean

hasMessages() - Wether a specific namespace has messages

Returns
Type Description
boolean
methodpublicpostDispatch( ) : \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)

Returns
Type Description
\Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
methodpublicresetNamespace( ) : \Zend_Controller_Action_Helper_FlashMessenger

resetNamespace() - reset the namespace to the default

Returns
Type Description
\Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
methodpublicsetNamespace( string $namespace = 'default' ) : \Zend_Controller_Action_Helper_FlashMessenger

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

Parameters
Name Type Description
$namespace string
Returns
Type Description
\Zend_Controller_Action_Helper_FlashMessenger Provides a fluent interface
Documentation was generated by DocBlox 0.15.1.