Skip to content

dframe/messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dframe/Sesssion - Component

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

php framework dframe logo

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