PHPackages                             isa/cmessage - 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. isa/cmessage

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

isa/cmessage
============

Class to show flash messages

010JavaScript

Since Dec 13Pushed 11y ago1 watchersCompare

[ Source](https://github.com/emmb14/CMessage)[ Packagist](https://packagist.org/packages/isa/cmessage)[ RSS](/packages/isa-cmessage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Alt text](https://camo.githubusercontent.com/cb831ede6bef6ae8b1705a337a21744c99707ad94a1763a2af0efd81e00649e1/68747470733a2f2f7472617669732d63692e6f72672f656d6d6231342f434d6573736167652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/cb831ede6bef6ae8b1705a337a21744c99707ad94a1763a2af0efd81e00649e1/68747470733a2f2f7472617669732d63692e6f72672f656d6d6231342f434d6573736167652e7376673f6272616e63683d6d6173746572)

CMessage
========

[](#cmessage)

Module for session-based Flash Messages that handels messages for error, success and information. If you are using Anax/MVC use the class CMessageAnax.

License
-------

[](#license)

This software is free software and carries a MIT license.

How to use
----------

[](#how-to-use)

Session must be started before including CMessage.

Include CMessage by adding this lines:

```
$di->set('message', function() {
	$message = new \Isa\CMessage\CMessage();
	return $message;
});

```

If you are using Anax/MVC include CMessage with this lines:

```
$di->set('message', function() use ($di) {
	$message = new \Isa\CMessage\CMessageAnax($di);
	return $message;
});

```

Simply add the desired messages by adding these lines:

For error-messages:

```
$app->message->addErrorMessage('This is a error-message');

```

For success-messages:

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

```

For information-messages:

```
$app->message->addInfoMessage('Detta är ett infomeddelande');

```

This lines will save the message/messages in the session and when you want to print out the messages call the method printMessage:

```
$app->message->printMessage();

```

For example you could place the messages in a variable like this:

```
$messages = $app->message->printMessage();

```

and then use this line to print it out on a page:

```
$app->views->addString($messages);

```

The messages are using icons from Font Awesome. If you want to include icons in your messages just download Font Awesome from  and place it in your project. Then make the project use the css-file, for example like this:

```
$app->theme->addStylesheet('css/font-awesome/css/font-awesome.css');

```

If you dont want to use the icons the messages will look fine even without them.

###  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/d138cd0ed461f86facede2eee42ee9a0545cfb5d77352e61f6baade9e42b2b01?d=identicon)[emm14](/maintainers/emm14)

---

Top Contributors

[![emmb14](https://avatars.githubusercontent.com/u/10120965?v=4)](https://github.com/emmb14 "emmb14 (22 commits)")

### Embed Badge

![Health badge](/badges/isa-cmessage/health.svg)

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

PHPackages © 2026

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