ZMObject
└─ZMMessages
public class ZMMessages
extends ZMObject
| Constant Summary | |
|---|---|
| final static str | Catch all (global) message reference type. |
| final static str | Message type error. |
| final static str | Message type message. |
| final static str | Message type success. |
| final static str | Message type warn. |
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| void | add(string text, string type, string ref) Generic add a message. |
| void | addAll(array messages) Add a group of messages. |
| void | clear() Clear all messages. |
| void | error(string text, string ref) Add an error message. |
| array | getMessages(string ref, boolean clear) Get all messages. |
| boolean | hasMessages(string ref) Checks if there are any messages available. |
| static void | instance() Get instance. |
| void | loadMessages(ZMSession session) Load messages from session. |
| void | msg(string text, string ref) Add a default message. |
| void | saveMessages(ZMSession session) Save messages in session. |
| void | success(string text, string ref) Add a success message. |
| void | warn(string text, string ref) Add a warning message. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public final static str REF_GLOBAL = 'global'
Catch all (global) message reference type.
public final static str T_ERROR = 'error'
Message type error.
public final static str T_MESSAGE = 'msg'
Message type message.
public final static str T_SUCCESS = 'success'
Message type success.
public final static str T_WARN = 'warn'
Message type warn.
public void __construct()
Create new instance.
public void add(string text, string type, string ref)
Generic add a message.
ZMMessages::T_MESSAGE.ZMMessages::REF_GLOBAL.public void addAll(array messages)
Add a group of messages.
ZMMessage instances.public void clear()
Clear all messages.
public void error(string text, string ref)
Add an error message.
ZMMessages::REF_GLOBAL.public array getMessages(string ref, boolean clear)
Get all messages.
null for all.false.ZMMessage instances.public boolean hasMessages(string ref)
Checks if there are any messages available.
null for all.true if messages are available, false if not.public static void instance()
Get instance.
public void loadMessages(ZMSession session)
Load messages from session.
public void msg(string text, string ref)
Add a default message.
ZMMessages::REF_GLOBAL.public void saveMessages(ZMSession session)
Save messages in session.
public void success(string text, string ref)
Add a success message.
ZMMessages::REF_GLOBAL.public void warn(string text, string ref)
Add a warning message.
ZMMessages::REF_GLOBAL.
Messages to be displayed to the user.
Messages will be saved in the session if not delivered.
Code supported message levels are:
T_ERRORT_WARNT_SUCCESST_MESSAGE(this is the default if no type specified)