kegi/flash-message

Flash messages handler

1.0.1 2016-11-08 21:21 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:56:17 UTC


README

A very simple flash message handler written in PHP. (PHP 7.0+)

Features:

  • Based on driver system to write/read messages
  • Multiple channels (optionnal)
  • By default, duplicated message within the same channel are ignored
  • Be default, messages are deleted when opened
  • Lightweight and no dependencies

Installation:

With composer :

composer require kegi/flash-message

A very simple example :

<?php

/*instantiate*/

$flashMessageController = new FlashMessageController(
    new SessionDriver()
);

/*add a message*/

$flashMessageController->success('Yay !');

/*get messages*/

var_dump($flashMessageController->getMessages());

Documentation

Documentation.

Contribution

Feel free to contact me or send pull requests ! or send your own driver !