Download the PHP package dtkahl/php-flash-messages without Composer
On this page you can find all versions of the php package dtkahl/php-flash-messages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-flash-messages
PHP flash messages
Session flash messages for PHP
Dependencies
PHP >= 5.6.0
Installation
Install with Composer:
composer require dtkahl/php-flash-messages
Usage
*Warning: Every new instance will be handled as new call and trunked data under given key in given store.
Methods
get($type, $key, $default = null)
Returns message with given $type
and $key
from last call or $default
if there is no message.
or call with predefined type:
- getError($key, $default = null)
- getWarning($key, $default = null)
- getSuccess($key, $default = null)
- getInfo($key, $default = null)
has($type, $key)
Determine if there is any message with given $type
and $key
from last call.
or call with predefined type:
- hasError($key)
- hasWarning($key)
- hasSuccess($key)
- hasInfo($key)
set($type, $key, $value)
Save message with given $type
and $key
to store for next call.
or call with predefined type:
- setError($key, $value)
- setWarning($key, $value)
- setSuccess($key, $value)
- setInfo($key, $value)
remove($type, $key)
Remove message with given $type
and $key
from store for next call.
or call with predefined type:
- removeError($key)
- removeWarning($key)
- removeSuccess($key)
- removeInfo($key)
removeAll($type)
Remove all messages with given $type
from store for next call.
or call with predefined type:
- removeError($key)
- removeWarning($key)
- removeSuccess($key)
- removeInfo($key)
getAll($type)
Return an array of all messages with given $type
from last call.
or call with predefined type:
- getAllError()
- getAllWarning()
- getAllSuccess()
- getAllInfo()
getAllTypes()
Return an array of all types and their messages from last call.
hasAny($type)
Determine if there is any messages with given $type
from last call.
or call with predefined type:
- hasAnyError()
- hasAnyWarning()
- hasAnySuccess()
- hasAnyInfo()