PHPackages                             tovo/flashmessage - 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. tovo/flashmessage

ActiveLibrary

tovo/flashmessage
=================

Class to handle feedback information by generating flash messages

06PHP

Since Jan 26Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f811533b95c988823804cc8f8302cd3d881df1c2be196ee38eee9398a06fe300/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f6d6173766f38392f666c6173686d6573736167652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tomasvo89/flashmessage/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/b6fdb799460baeed5035d4ee224bc83c986ef0c97e589790f5ddef058db16270/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f6d6173766f38392f666c6173686d6573736167652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tomasvo89/flashmessage/?branch=master)[![Build Status](https://camo.githubusercontent.com/e703e78ce6dafcac7662711e99f7854b3b88751b81a1af949cc69393f1ec5261/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f6d6173766f38392f666c6173686d6573736167652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tomasvo89/flashmessage/build-status/master)

CFlashmsg
=========

[](#cflashmsg)

Class CFlashmsg - a class to handle feedback information based on user's actions by generating flash messages.

By Tomas Vo,

Install instructions
--------------------

[](#install-instructions)

\###1. Download

Install by using composer. Add this code to your composer.json:

```
"require": {
    "tovo/flashmessage": "dev-master"
},
```

\###2. Include CFlashmsg to your framework

Add this code to your front-controller.

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

Add the following codes to retrieve flash messages:

For success messages:

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

For error messages:

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

For warning messages:

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

For info messages:

```
    $app->CFlashmsg->addInfo('This is an information message');
```

The messages will be saved in the session, call these lines to print out the messages:

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

\###3. Optional

The class is compatible with Font Awesome.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

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/78773be152fd9fdab445da8a6d5a3bc6dbcff7281ed06b589878c6771c78ca5e?d=identicon)[ichinoda](/maintainers/ichinoda)

---

Top Contributors

[![tomasvo89](https://avatars.githubusercontent.com/u/10552701?v=4)](https://github.com/tomasvo89 "tomasvo89 (13 commits)")

### Embed Badge

![Health badge](/badges/tovo-flashmessage/health.svg)

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

PHPackages © 2026

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