Tiger_Model_MessageObject
@api
Tiger_Model_MessageObject — one feedback message in the API response envelope.
Ported from AskLevi's proven Levi_Model_MessageObject. class maps to a
Bootstrap alert context (success/error/alert/info) the client renders. The
message is treated as a translation KEY: it's translated in the current locale,
falling back to the default language, and finally to the raw string (so plain
text passed in still works). This keeps every API message localized without the
service having to think about it.
Methods
__construct()
__construct($message, $class = 'info', $field = null)
Build a feedback message, translating the message as a key when possible.
$messagestring— the message text, or a translation key to resolve$classstring— Bootstrap alert context: success | error | alert | info$fieldstring|null— the form field this message attaches to, if any