PHPackages                             ath400/cflash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ath400/cflash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ath400/cflash
=============

Class for flash messages

011PHP

Since May 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/athens400/cflash)[ Packagist](https://packagist.org/packages/ath400/cflash)[ RSS](/packages/ath400-cflash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

CFlash
======

[](#cflash)

[![Build Status](https://camo.githubusercontent.com/c36c1c10e52ab9ff94385e3224b4b43fef85b8efe51ceb2a9cc3e41ca7921ee5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617468656e733430302f63666c6173682f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/athens400/cflash/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/08a197734339cc3b09248da04c5d1db15a60a0aac2cfbf047a249517b232184b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617468656e733430302f63666c6173682f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/athens400/cflash/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0b44ee588753fee7dc8c337f09467d27a5493a286725cca58992fb2b0c04cdf1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617468656e733430302f63666c6173682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/athens400/cflash/?branch=master)

By Daniel Svensson,

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

How to use with ANAX
--------------------

[](#how-to-use-with-anax)

Set the CFlash service, in your frontcontroller for instance, by including the follwing:

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

```

CFlash does not start the session, you have to do that yourself.

Messages are set like so:

```
$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.

Get the message:

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

```

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

License
-------

[](#license)

This software is free software and carries a MIT license

History
-------

[](#history)

v1.0.0 (2015-04-29)

- First release

```
 .
..:  Copyright (c) 2015 Daniel Svensson, athens400@hotmail.com

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a92fcca51f1fe0a4a410aea170c00aec1fd25800168a055972aa13bb893f6381?d=identicon)[athens400](/maintainers/athens400)

---

Top Contributors

[![athens400](https://avatars.githubusercontent.com/u/12172158?v=4)](https://github.com/athens400 "athens400 (9 commits)")

### Embed Badge

![Health badge](/badges/ath400-cflash/health.svg)

```
[![Health](https://phpackages.com/badges/ath400-cflash/health.svg)](https://phpackages.com/packages/ath400-cflash)
```

###  Alternatives

[gitonomy/gitlib

Library for accessing git

46418.6M56](/packages/gitonomy-gitlib)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
