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

ActiveZf-module

stagem/zfc-flash
================

ZF Adapters for different Flash Managers

0.1.0(8y ago)311MITPHPPHP &gt;=7.0

Since Apr 6Pushed 8y ago2 watchersCompare

[ Source](https://github.com/stagemteam/zfc-flash)[ Packagist](https://packagist.org/packages/stagem/zfc-flash)[ RSS](/packages/stagem-zfc-flash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Zfc Flash
=========

[](#zfc-flash)

ZF Adapters for different Flash Managers

There are many FLash Messages implementation and all of them have different interfaces. This plugin provide one `FlashInterface` which allow write custom `Adapter` for any Flash library.

By default this package uses [`slim/flash`](https://github.com/slimphp/Slim-Flash).

Package has several registered namespace which allow group massages and show beauty html markup for all of them.

- default
- success
- warning
- error
- info

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

[](#installation)

```
composer require stagem/zfc-flash

```

**In Expressive**

You should enable module in `config/config.php` as `Stagem\ZfcFlash\ConfigProvider::class`and register middleware in`config/pipeline.php`

```
$app->pipe(\Stagem\ZfcFlash\FlashMiddleware::class);
```

This allow gets flash object from request as `$flash = $request->getAttribute('flash');`

Usage
-----

[](#usage)

**In Expressive**

```
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Diactoros\Response\RedirectResponse;

function($request, RequestHandlerInterface $handler)
{
    $flash = $request->getAttribute('flash');
    $flash->addMessage('Hello World!', 'success');

    return new RedirectResponse('/other-middleware');
}
```

Out of the box this module works with `Zend\View\Helper\FlashMessenger` and `twitter bootstrap`

Include `flash-messages` template in your template as ``

If you want change html markup or style see section *Custom Flash*.

Custom Flash
------------

[](#custom-flash)

Be carefully, you should enable your module after `Stagem\ZfcFlash\ConfigProvider::class` in `config/config.php`

You can develop custom adapter for any `Flash Messages` only implement `Stagem\ZfcFlash\FlashInterface`and register in `depenencies` in your `config/module.config.php`

### Custom template

[](#custom-template)

Create new *.phtml* file, get messages and implement custom html markup. You can use [`current`](https://github.com/popovserhii/zfc-current) helper or other approach for get `Request` object and than get the `flash`.

```
// view/widget/flash-messages.phtml
#$flash = $this->current('request')->getAttribute('flash');
$messages = $flash->getAllMessages();
// iterate over array
```

After that add your template to `config/module.config.php` and include in template

```
return [
    'templates' => [
        'paths' => [
            'widget' => [__DIR__ . '/../view/widget'],
        ],
    ],
];
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2955d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7dbdbd3abed25e11e97a69bc611daa3fe33ad5d1805f2fb32d491c888c4dfb51?d=identicon)[Serhii Popov](/maintainers/Serhii%20Popov)

---

Top Contributors

[![popovserhii](https://avatars.githubusercontent.com/u/1991183?v=4)](https://github.com/popovserhii "popovserhii (3 commits)")[![stagemteam](https://avatars.githubusercontent.com/u/37902825?v=4)](https://github.com/stagemteam "stagemteam (2 commits)")[![vladgemtyp](https://avatars.githubusercontent.com/u/12100554?v=4)](https://github.com/vladgemtyp "vladgemtyp (1 commits)")

---

Tags

zf2zf3zf-expressiveflash manager

### Embed Badge

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

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

###  Alternatives

[zfr/rbac

Zend Framework 3 prototype for Zend\\Permissions\\Rbac.

271.1M7](/packages/zfr-rbac)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)[los/loslog

LosLog provides some log utility

1751.2k2](/packages/los-loslog)[radnan/rdn-upload

Zend Framework 2/3 module to manage file uploads easily and securely

177.4k](/packages/radnan-rdn-upload)[san/san-captcha

Laminas Sample For Captcha

106.5k](/packages/san-san-captcha)

PHPackages © 2026

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