PHPackages                             olund/flash - 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. olund/flash

ActiveLibrary

olund/flash
===========

A small flash module for Anax-MVC

012PHP

Since May 15Pushed 12y ago1 watchersCompare

[ Source](https://github.com/olund/Flash)[ Packagist](https://packagist.org/packages/olund/flash)[ RSS](/packages/olund-flash/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Flash
=====

[](#flash)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/383aa669c435f89b86db0c2be6236de49cc1d0d3b08d5c7fd0f7edbde1544e98/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6c756e642f466c6173682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/olund/Flash/?branch=master)[![Build Status](https://camo.githubusercontent.com/b794b21fc2879bf6574e006543c3f21f5778cd6048dec58ff0e527eb0b76290a/68747470733a2f2f7472617669732d63692e6f72672f6f6c756e642f466c6173682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/olund/Flash)[![Code Coverage](https://camo.githubusercontent.com/02535666bb7d6a0ab6b4692fda83c489fae59685fca905041f69836bd76cb32d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6c756e642f466c6173682f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/olund/Flash/?branch=master)You can also find this on [Packagist](https://packagist.org/packages/olund/flash)

```
 _____ _           _
|  ___| | __ _ ___| |__
| |_  | |/ _` / __| '_ \
|  _| | | (_| \__ \ | | |
|_|   |_|\__,_|___/_| |_|

```

A small PHP Flash module for [Anax-MVC](https://github.com/olund/Anax-MVC) based on sessions.

Preview
=======

[](#preview)

[![alt tag](https://camo.githubusercontent.com/a34acd4b2a68e6295a7b6159254078bc9cac8b29c5c199303771e8620b70ee3c/68747470733a2f2f692e696d6775722e636f6d2f54434b436371712e706e67)](https://camo.githubusercontent.com/a34acd4b2a68e6295a7b6159254078bc9cac8b29c5c199303771e8620b70ee3c/68747470733a2f2f692e696d6775722e636f6d2f54434b436371712e706e67)

Instructions for Anax-MVC
=========================

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

Add the following to your frontcontroller.

```
// Start session.
$app->withSession();

// Set flash as a shared service.
$di->setShared('flash', function () {
    $flash = new \Anax\Flash\CFlash();
    return $flash;
});
```

You can now use Flash

```
$app->flash->success('Success message');
$app->flash->error('Error message');
$app->flash->notice('Notice message');
$app->flash->warning('Warning message');
```

To get the html use:

```
$app->flash->get()
```

Example:

```
// Create a route.
$app->router->add('flash', function () use ($app) {
    // Sets the title
    $app->theme->setTitle('Flash');

    // Add some flash messages
    $app->flash->success('This is a success message');
    $app->flash->error('Error message');
    $app->flash->notice('Notice message');
    $app->flash->warning('Warning message');
    $app->flash->success('Success again');

    // Call the flash->get() method.
    $app->views->addString($app->flash->get(), 'main');
    // Use $app->flash->get(false) if you dont have FontAwesome.
});
```

The output:

```
Error message
Success message
Notice message
Warning message
```

###  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/585f6ab6365dd0245e9b5e532463f1b010d4b03e4a9a4e89b7c75513c89351c3?d=identicon)[Olund](/maintainers/Olund)

---

Top Contributors

[![olund](https://avatars.githubusercontent.com/u/3016447?v=4)](https://github.com/olund "olund (34 commits)")

### Embed Badge

![Health badge](/badges/olund-flash/health.svg)

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

PHPackages © 2026

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