Download the PHP package romanato/php-flashingo-messages without Composer
On this page you can find all versions of the php package romanato/php-flashingo-messages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download romanato/php-flashingo-messages
More information about romanato/php-flashingo-messages
Files in romanato/php-flashingo-messages
Package php-flashingo-messages
Short Description For this package there is no description available.
License
Informations about the package php-flashingo-messages
php-flashingo-messages
Session based flash messages for PHP.
Flash messages are optimized to work with Bootstrap.
Installation
Usage
Advanced usage
Customize
Editing default css class
In FlashingoMessage.php you can add your own default class so it will fit perfectly for your project:
Adding custom types
In FlashingoMessage.php you can add your own types:
So the generated HTML can look like this:
Methods
set(string
$message [, string
$type, array
$options])
This method sets a message. There are 3 parameters:
string
$message - The message that will shownstring
$type (optional) - Type of flash messagearray
$options (optional) - Sets name|class for flash message.
setError(string
$message [, array
$options])
This method sets an error message.
setWarning(string
$message [, array
$options])
This method sets a warning message.
setInfo(string
$message [, array
$options])
This method sets a info message.
setSuccess(string
$message [, array
$options])
This method sets a success message.
setDefault(string
$message [, array
$options])
This method sets a default message.
display(string
$name)
This method shows a message with unique name.
displayAll()
This method shows all messages.
destroyAll()
This method destroys all the session messages.
Options
Every set()
method has the same options as a 3rd array parameter:
- name - Unique id for flash message
- class - Custom class for flash message