PHPackages                             ernb14/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. ernb14/cflash

ActiveLibrary

ernb14/cflash
=============

Flash message class for Anax-MVC

08PHP

Since Dec 1Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

CFlash for Anax-MVC
===================

[](#cflash-for-anax-mvc)

With CFlash you can customize your own flash messages easy. With five pre defined flash message types it is very easy to install. You can also create your own personal ones.

License
-------

[](#license)

This software is free software and carries a MIT license.

Installation
------------

[](#installation)

To install with Composer and Packagist:
`"ernb14/cflash": "dev-master"`

How to use flash messages
-------------------------

[](#how-to-use-flash-messages)

Firs you need to add this shared service in to your page controller.

`$di->setShared('flash', function() use ($di) {  $flashmessage = new \CFlash\CFlash\CFlash();  $flashmessage->setDI($di);  return $flashmessage;  });`

Then you need to copy the images and css file in to your img and css paths. So you need to go to your theme root path like this:
`cd your-theme`
`cp vendor/ernb14/CFlash/src/CFlash/css/CFlash.css webroot/css`
`cp -r vendor/ernb14/CFlash/src/CFlash/img/flash webroot/img`

Now you only have to put this out in a route: Example message `$app->flash->CustomMessage('Godkänt', 'success'); ` and to display the message use `$messages = $app->flash->displayFlashMessages();` and `$app->views->addString($messages);` to retrive the messages.

Pre defined messages
--------------------

[](#pre-defined-messages)

This class includes five pre defined messages. And those are 'error', 'success', 'info', 'warning', 'notice'. Here is and example of how you can use one: `$app->flash->CustomMessage('Felmeddelenade', 'error');`

To create a new message you can do this `$app->flash->CustomMessage('Your message', 'message type');` which the type defines the css class that you can modify.

###  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/2387539001e7a7953dc2c35c255357ee35263fc8e688137c2bd5ede40ff017f8?d=identicon)[naess91](/maintainers/naess91)

---

Top Contributors

[![naess91](https://avatars.githubusercontent.com/u/9981046?v=4)](https://github.com/naess91 "naess91 (16 commits)")

### Embed Badge

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

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

PHPackages © 2026

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