| Fully Qualified Name: | Zend\Mvc\Plugin\FlashMessenger\FlashMessenger |
| Extends: | AbstractPlugin |
| Implements: | IteratorAggregate, Countable |
Flash Messenger - implement session-based messages
| Name | Description | Defined By |
|---|---|---|
| addErrorMessage() | Add a message with "error" type | FlashMessenger |
| addInfoMessage() | Add a message with "info" type | FlashMessenger |
| addMessage() | Add a message | FlashMessenger |
| addSuccessMessage() | Add a message with "success" type | FlashMessenger |
| addWarningMessage() | Add a message with "warning" type | FlashMessenger |
| clearCurrentMessages() | Clear messages from the current request and current namespace | FlashMessenger |
| clearCurrentMessagesFromContainer() | Clear messages from the container | FlashMessenger |
| clearCurrentMessagesFromNamespace() | Clear messages from the current namespace | FlashMessenger |
| clearMessages() | Clear all messages from the previous request & current namespace | FlashMessenger |
| clearMessagesFromContainer() | Clear all messages from the container | FlashMessenger |
| clearMessagesFromNamespace() | Clear all messages from specific namespace | FlashMessenger |
| count() | Complete the countable interface | FlashMessenger |
| getContainer() | Get session container for flash messages | FlashMessenger |
| getController() | Get the current controller instance | AbstractPlugin |
| getCurrentErrorMessages() | Get messages that have been added to the "error" namespace within this request | FlashMessenger |
| getCurrentInfoMessages() | Get messages that have been added to the "info" namespace within this request | FlashMessenger |
| getCurrentMessages() | Get messages that have been added to the current namespace within this request | FlashMessenger |
| getCurrentMessagesFromNamespace() | Get messages that have been added to the current namespace in specific namespace | FlashMessenger |
| getCurrentSuccessMessages() | Get messages that have been added to the "success" namespace within this request | FlashMessenger |
| getCurrentWarningMessages() | Get messages that have been added to the "warning" namespace within this request | FlashMessenger |
| getErrorMessages() | Get messages from "error" namespace | FlashMessenger |
| getInfoMessages() | Get messages from "info" namespace | FlashMessenger |
| getIterator() | Complete the IteratorAggregate interface, for iterating | FlashMessenger |
| getMessages() | Get messages from a specific namespace | FlashMessenger |
| getMessagesFromNamespace() | Get messages from a specific namespace | FlashMessenger |
| getNamespace() | Get the message namespace | FlashMessenger |
| getSessionManager() | Retrieve the session manager | FlashMessenger |
| getSuccessMessages() | Get messages from "success" namespace | FlashMessenger |
| getWarningMessages() | Get messages from "warning" namespace | FlashMessenger |
| hasCurrentErrorMessages() | Check to see if messages have been added to "error" namespace within this request | FlashMessenger |
| hasCurrentInfoMessages() | Check to see if messages have been added to "info" namespace within this request | FlashMessenger |
| hasCurrentMessages() | Check to see if messages have been added to the current namespace within this request | FlashMessenger |
| hasCurrentSuccessMessages() | Check to see if messages have been added to "success" namespace within this request | FlashMessenger |
| hasCurrentWarningMessages() | Check to see if messages have been added to "warning" namespace within this request | FlashMessenger |
| hasErrorMessages() | Whether "error" namespace has messages | FlashMessenger |
| hasInfoMessages() | Whether "info" namespace has messages | FlashMessenger |
| hasMessages() | Whether a specific namespace has messages | FlashMessenger |
| hasSuccessMessages() | Whether "success" namespace has messages | FlashMessenger |
| hasWarningMessages() | Whether "warning" namespace has messages | FlashMessenger |
| setController() | Set the current controller instance | AbstractPlugin |
| setNamespace() | Change the namespace messages are added to | FlashMessenger |
| setSessionManager() | Set the session manager | FlashMessenger |
Add a message with "error" type
| Parameter Name | Type | Description |
|---|---|---|
| $message | string |
Returns: \FlashMessenger
Add a message with "info" type
| Parameter Name | Type | Description |
|---|---|---|
| $message | string |
Returns: \FlashMessenger
Add a message
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $namespace | null|string | |
| $hops | null|int |
Returns: \FlashMessenger Provides a fluent interface
Add a message with "success" type
| Parameter Name | Type | Description |
|---|---|---|
| $message | string |
Returns: \FlashMessenger
Add a message with "warning" type
| Parameter Name | Type | Description |
|---|---|---|
| $message | string |
Returns: \FlashMessenger
Clear messages from the current request and current namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: bool True if current messages were cleared, false if none existed.
Clear messages from the container
Returns: bool True if current messages were cleared from the container, false if none existed.
Clear messages from the current namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespaceToClear | string |
Returns: bool True if current messages were cleared from the given namespace, false if none existed.
Clear all messages from the previous request & current namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: bool True if messages were cleared, false if none existed
Clear all messages from the container
Returns: bool True if messages were cleared, false if none existed
Clear all messages from specific namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespaceToClear | string |
Returns: bool True if messages were cleared, false if none existed
Complete the countable interface
Returns: int
Get session container for flash messages
Returns: \Container
Get the current controller instance
Returns: null|\Dispatchable
Get messages that have been added to the "error" namespace within this request
Returns: array
Get messages that have been added to the "info" namespace within this request
Returns: array
Get messages that have been added to the current namespace within this request
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: array
Get messages that have been added to the current namespace in specific namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespaceToGet | string |
Returns: array
Get messages that have been added to the "success" namespace within this request
Returns: array
Get messages that have been added to the "warning" namespace within this request
Returns: array
Get messages from "error" namespace
Returns: array
Get messages from "info" namespace
Returns: array
Complete the IteratorAggregate interface, for iterating
Returns: \ArrayIterator
Get messages from a specific namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: array
Get messages from a specific namespace
| Parameter Name | Type | Description |
|---|---|---|
| $namespaceToGet | string |
Returns: array
Get the message namespace
Returns: string
Retrieve the session manager
If none composed, lazy-loads a SessionManager instance
Returns: \Manager
Get messages from "success" namespace
Returns: array
Get messages from "warning" namespace
Returns: array
Check to see if messages have been added to "error" namespace within this request
Returns: bool
Check to see if messages have been added to "info" namespace within this request
Returns: bool
Check to see if messages have been added to the current namespace within this request
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: bool
Check to see if messages have been added to "success" namespace within this request
Returns: bool
Check to see if messages have been added to "warning" namespace within this request
Returns: bool
Whether "error" namespace has messages
Returns: bool
Whether "info" namespace has messages
Returns: bool
Whether a specific namespace has messages
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: bool
Whether "success" namespace has messages
Returns: bool
Whether "warning" namespace has messages
Returns: bool
Set the current controller instance
| Parameter Name | Type | Description |
|---|---|---|
| $controller | \Dispatchable |
Returns: void
Change the namespace messages are added to
Useful for per action controller messaging between requests
| Parameter Name | Type | Description |
|---|---|---|
| $namespace | string |
Returns: \FlashMessenger Provides a fluent interface
Set the session manager
| Parameter Name | Type | Description |
|---|---|---|
| $manager | \Manager |
Returns: \FlashMessenger