dframe / messages
Messages component Dframe
v4.0.1
2020-04-10 09:55 UTC
Requires
- php: >=7.0
- ext-json: *
- psr/simple-cache: ^1.0
Requires (Dev)
- dframe/session: ^4.0
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-12-10 20:20:45 UTC
README
Composer
$ composer require dframe/messages
Standalone
$driver = new \Dframe\Component\Session\Session('sessionName'); /** * $driver Can be any class implements interface \Psr\SimpleCache\CacheInterface */ $messages = new \Dframe\Component\Messages\Messages($driver); $messages->add('info', 'String Information.'); // types ['help', 'info', 'warning', 'error', 'success'] $messages->hasMessages('info'); // Check to see if there are any ($type) messages queued. $messages->hasErrors(); // true There ARE error messages false There are NOT any error messages $messages->display('all'); // Return true/false
License
Open-sourced software licensed under the MIT license