PHPackages                             chja/cfmessage - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. chja/cfmessage

ActiveLibrary[Queues &amp; Workers](/categories/queues)

chja/cfmessage
==============

Class for flash messages

v1.0(11y ago)027MITPHPPHP &gt;=5.4

Since Apr 15Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Cfmessage
=========

[](#cfmessage)

[![Build Status](https://camo.githubusercontent.com/f596eee024d437970ff3a7dbc4a81e54a6f86411789a60b74d2803bb2f2bd380/68747470733a2f2f7472617669732d63692e6f72672f4469676974616c477269642f63666d6573736167652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DigitalGrid/cfmessage)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/283cc912ff161e1d3781588857b45e48bdde38620c544c28a8b7e8402307944b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4469676974616c477269642f63666d6573736167652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DigitalGrid/cfmessage/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/2d71ee70ce149059f8395f0be8a4ffc6e6122e7743fdbf63adc92137a8da980f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4469676974616c477269642f63666d6573736167652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DigitalGrid/cfmessage/?branch=master)

Module that shows flash messages. It handels messages for success, information and errors for the user.

By Christofer Jadelius

\###License

This software is free software and carries a MIT license.

\###How to install

First you have to include this code in your composer.json file:

```
"require": {
	"chja/cfmessage": "dev-master"
},
```

\###How to use with Anax/MVC

After you have downloaded the package add this code to your front-controller:

```
$di->set('Cfmessage', function() use ($di) {
    $message = new \Chja\Cfmessage\CfmessageAnax();
    $message->setDI($di);
    return $message;
});
```

Note: Before you start adding messages you will have to start a session if you have not done that yet.

Now you can start adding all the messages you want to use. below you can see some examples.

Info messages:

```
	$app->Cfmessage->addNotice('This is an information message');
```

Error messages:

```
	$app->Cfmessage->addError('This is an error message');
```

success messages:

```
	$app->Cfmessage->addSuccess('This is a success message');
```

warning messages:

```
	$app->Cfmessage->addWarning('This is a warning message');
```

When a message has been added it will be saved in the session, use these lines to print the message/messages:

```
	$messages = $app->Cfmessage->printMessage();
    $app->views->addString($messages);
```

You can also clear the session by invoking this method:

```
	$app->Cfmessage->clearSession();
```

All the messages are using icons from Font Awesome. Font Awesome is not required but the meaning of the messages will be a little bit clearer if you use it.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4052d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0703ce9d00ea2e15a24eead573c97da3d449407ace448724b42e8e9a00fa6492?d=identicon)[DigitalGrid](/maintainers/DigitalGrid)

---

Top Contributors

[![DigitalGrid](https://avatars.githubusercontent.com/u/7487447?v=4)](https://github.com/DigitalGrid "DigitalGrid (12 commits)")

---

Tags

messageflash

### Embed Badge

![Health badge](/badges/chja-cfmessage/health.svg)

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

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k125.3M879](/packages/php-amqplib-php-amqplib)[aws/aws-php-sns-message-validator

Amazon SNS message validation for PHP

21421.5M91](/packages/aws-aws-php-sns-message-validator)

PHPackages © 2026

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