humble / flash
HUMBLE Flash
dev-master
2016-02-28 22:41 UTC
Requires
- php: >=7.0.0
- humble/standards: ~1.0
- psr/http-message: ^1.0
Requires (Dev)
- phpunit/phpunit: ~5.2
This package is not auto-updated.
Last update: 2025-01-04 19:32:17 UTC
README
HUMBLE Flash
Install
Via Composer
$ composer require humble/flash
Usage
Get PHP Flash.
$flash = new \Humble\Flash\Flash;
Get PHP Flash with custom settings.
$flash = new \Humble\Flash\Flash(array('sessionKey' => 'flash'));
Save PHP Flash messages from PHP Flash session.
$flash->saveMessages();
Reset PHP Flash session.
$flash->resetSession();
Save and reset with PSR-7 Flash Middleware.
$middleware = new \Humble\Flash\FlashMiddleware($flash);
$response = $middleware($request, $response, $next);
Get saved PHP Flash messages.
$messages = $flash->getMessages();
Push PHP Flash message to PHP Flash session.
$flash->pushMessage('success', "It's just a test!");
License
The MIT License (MIT). Please see License File for more information.