2017 © Pedro Peláez
 

library flashmessages

FlashMessages is a class to handle success, debug, warning and error messages. It's made for the framework Anax-MVC.

image

ider/flashmessages

FlashMessages is a class to handle success, debug, warning and error messages. It's made for the framework Anax-MVC.

  • Sunday, December 14, 2014
  • by idajosefin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Code Coverage, (*1)

FlashMessages

FlashMessages is a class to handle success, debug, warning and error messages. It's made for the framework Anax-MVC., (*2)

How to use

1. Download

The easiest way to install this is using composer. Add this your composer.json:, (*3)

"require": {
    "ider/flashmessages": "dev-master"
},

2. Include FlashMessages in your project

Session must be started before using FlashMessages. In order to include the class in you Anax-MVC, you can add this in your front controller:, (*4)

$di->setShared('FlashMessages', function() use ($di) { 
    $FlashMessages = new \ider\FlashMessages\FlashMessages($di); 
    return $FlashMessages; 
});

3. Generate and display messages

Four different types of messages can be generated. Here is and example of how you can display a message in Anax-MVC:, (*5)

    $app->FlashMessages->addSuccess("Yes, Everything went very smoothly!");
    $app->FlashMessages->addInfo("This is very important information.");
    $app->FlashMessages->addWarning("This is a warning.");
    $app->FlashMessages->addError("Too bad! Something went wrong.");

The Versions

14/12 2014

dev-master

9999999-dev http://idajosefin.com

FlashMessages is a class to handle success, debug, warning and error messages. It's made for the framework Anax-MVC.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

messages status flash flashing