2017 © Pedro Peláez

library cflash

Class for flash messages



Class for flash messages

  • Monday, May 18, 2015
  • by athens400
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown



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

By Daniel Svensson, athens400@hotmail.com, (*2)

Set and get messages (error, success, notice, warning) in HTML div elements to/from session. CFormAnax is an example used with the Anax framework, (*3)

How to use with ANAX

Set the CFlash service, in your frontcontroller for instance, by including the follwing:, (*4)

$di->set('message', function() use ($di) {
    $message = new \Ath400\Flash\CFlashAnax();
    return $message;

CFlash does not start the session, you have to do that yourself., (*5)

Messages are set like so:, (*6)

$app->message->error('Some message');

$app->message->success('Some message');

$app->message->notice('Some message');

$app->message->warning('Some message');

Only one message is stored at a time. Meaning you only have to get one message which, depending on user action and controller responsible for calling the message methods, will output an error, success, notice or warning message., (*7)

Get the message:, (*8)

$message = $app->message-getMessage();

You can also include the stylesheet located in webroot/css-folder to give the message-boxes different colors., (*9)


This software is free software and carries a MIT license, (*10)


v1.0.0 (2015-04-29), (*11)

  • First release
..:  Copyright (c) 2015 Daniel Svensson, athens400@hotmail.com

The Versions

18/05 2015



Class for flash messages

  Sources   Download


The Development Requires

by Daniel Svensson

message flash