PHPackages                             kalkih/flashy - 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. kalkih/flashy

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

kalkih/flashy
=============

Small session based flash class, written mainly for Anax-MVC.

171PHP

Since May 15Pushed 12y ago1 watchersCompare

[ Source](https://github.com/kalkih/Flashy)[ Packagist](https://packagist.org/packages/kalkih/flashy)[ RSS](/packages/kalkih-flashy/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Flashy
======

[](#flashy)

[![Build Status](https://camo.githubusercontent.com/aed2ee7ff0e1d1f87a6aaf73debd5b1c042bae171cb6919f643d68d2d44c952f/68747470733a2f2f7472617669732d63692e6f72672f6b616c6b69682f466c617368792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kalkih/Flashy) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/7f09a12ab6b5d9da1324c01a9724518a8bfbf71b83dbb3d24d3c8af2ed47f9de/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b616c6b69682f466c617368792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kalkih/Flashy/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/d573bc7022f133f0cd82553e25f0f4253c4a4f0a4ca60cd557d9ea656d32ecac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b616c6b69682f466c617368792f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kalkih/Flashy/?branch=master)

A small PHP flash class to store and get information and messages.

Flashy comes with a simple and minimalistic pre-defined stylesheet. Flashy supports four different message types (info, success, warning and error). Flashy does also support Font Awesome. (see instructions below for code examples).

Preview
=======

[](#preview)

[![alt tag](https://camo.githubusercontent.com/2088b75b613352669e5deba89ffdd8396b07a0aed7202d49909d5fa67b1ded7f/687474703a2f2f692e696d6775722e636f6d2f754f43757948772e706e67)](https://camo.githubusercontent.com/2088b75b613352669e5deba89ffdd8396b07a0aed7202d49909d5fa67b1ded7f/687474703a2f2f692e696d6775722e636f6d2f754f43757948772e706e67)

Functions
=========

[](#functions)

- add('Message type', 'Your message') // Add a new message
- get('Extra parameter') // Get messages as HTML (optionally: parameter)
- clear() // Clear all messages, also called from get()

Valid message types:
--------------------

[](#valid-message-types)

- 'info'
- 'success'
- 'warning'
- 'error'

Valid get parameters:
---------------------

[](#valid-get-parameters)

- 'icons' // Adds Font Awesome icons to the output

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

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

Add the following to the top of your frotcontroller.

```
// Get environment & autoloader, the $di & $app-object.
require __DIR__.'/config_with_app.php';

// Services
$di->setShared('flash', function() {
	$flash = new \kalkih\Flash\Flash();
	return $flash;
});

// Other services, modules, controllers here

// Starts the session (required by the Flashy class)
$app->session;

```

If you want to use the bundled flashy stylesheet add following code to the frontcontroller (Note: you have to copy the stylesheet to your css folder for this to work).

```
// Extra stylesheets
$app->theme->addStylesheet('css/flashy.css');

```

You can now use the Flashy class.

```
// From a route in the frontcontroller:

$app->flash->add('info', 'This is a info message');
$app->flash->add('success', 'This is a success message');
$app->flash->add('warning', 'This is a warning message');
$app->flash->add('error', 'This is a error message');

// From a controller:

$this->flash->add('info', 'This is a info message');
$this->flash->add('success', 'This is a success message');
$this->flash->add('warning', 'This is a warning message');
$this->flash->add('error', 'This is a error message');

```

To get message/messages and print it/them out, just add following code to a view

```
$app->flash->get();
// or if in a view / controller
$this->flash->get();

```

The output should look like this

```

	This is a info message

	This is a success message

	This is a warning message

	This is a error message

```

If you have support for Font Awesome and want to show related icons with each message use the code below.

```
$app->flash->get('icons');
// or if in a view / controller
$this->flash->get('icons');

```

The output with icons should look like this:

```

	This is a info message

	This is a success message

	This is a warning message

	This is a error message

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

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/dc93a65b7aa931440b0ab55586d98c1cbade773ef6299ecd261fdfdee0341358?d=identicon)[kalkih](/maintainers/kalkih)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/kalkih-flashy/health.svg)

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

###  Alternatives

[steevanb/doctrine-stats

Count managed and lazy loaded entities, hydration time etc

7182.9k1](/packages/steevanb-doctrine-stats)

PHPackages © 2026

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