PHP Class for handling flash messages
Php class for flash messsages.
, (*1)
This software is free software and carries a MIT license., (*2)
Install using composer. Add to your composer.json:, (*3)
"require": { "sial/FlashMessage": "dev-master" },
You can also download as .zip!, (*4)
To include FlashMessage in your ANAX-application, add the class in your front controller:, (*5)
$di->set('Flash', function() use ($di) { $flash = new \Sial\FlashMessage\CFlashMessage(); $flash->setDI($di); return $flash; });
Also an example in webroot shows how to include FlashMessage in your ANAX-application., (*6)
$app->Flash->setMessage('success')
$app->Flash->getMessage()
You have 2 params in setMessages() as shown in the example below., (*7)
$app->Flash->setMessage(messageType, message)
You can choose from 4 message types ( success, notice, warning, error) in the first param., (*8)
The second param is optional that enables you to write your own custom message. If not set a default message will be prompted., (*9)