PHPackages                             szmnmichalowski/szm-notification - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. szmnmichalowski/szm-notification

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

szmnmichalowski/szm-notification
================================

Controller plugin to store notifications in session. Used for notification view helper

1.0.0(9y ago)0401MITPHPPHP ^5.6 || ^7.0

Since Mar 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/szmnmichalowski/SzmNotification)[ Packagist](https://packagist.org/packages/szmnmichalowski/szm-notification)[ Docs](https://github.com/szmnmichalowski/SzmNotification)[ RSS](/packages/szmnmichalowski-szm-notification/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (1)

SzmNotification
---------------

[](#szmnotification)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/27f87adad8104f70c2b0ebb212f68a71ddb9c88e37f24a0ce1f3fa7c04fe0573/68747470733a2f2f7472617669732d63692e6f72672f737a6d6e6d696368616c6f77736b692f537a6d4e6f74696669636174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/szmnmichalowski/SzmNotification)[![Code Coverage](https://camo.githubusercontent.com/850dd739e6e8edbc48b17259ea167626fb69051f0ccec8110516d30db86696dd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f737a6d6e6d696368616c6f77736b692f537a6d4e6f74696669636174696f6e2f6261646765732f636f7665726167652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/szmnmichalowski/SzmNotification/?branch=develop)

SzmNotification is a [Zend Framework 2/3](http://framework.zend.com/) controller plugin which stores notification in session container (same as FlashMessanger). It is designed to work with one of the following notifiction helpers:

- [SzmNoty](https://github.com/szmnmichalowski/SzmNoty) - jQuery plugin

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

[](#installation)

You can install this module via composer

**1.** Add this project into your composer.json

```
"require": {
    "szmnmichalowski/szm-notification": "dev-master"
}

```

**2.** Update your dependencies

```
$ php composer.phar update

```

**3.** Add module to your **application.config.php**. It requires `Zend\Session`

```
return array(
    'modules' => array(
        'Zend\Session',
        'SzmNotification' // notification()->add('info', 'Lorem ipsum');
$this->notification()->has('info');
$this->notification()->get('info');

$this->notification()->addInfo('Lorem ipsum');
$this->notification()->hasInfo();
$this->notification()->getInfo();

```

#### Available methods:

[](#available-methods)

Global methods:

- `add($type, $text)` - Add notification
- `has($type)` - Check if namespace contains any notification added in previous request
- `hasCurrent($type)` - Check if namespace contains any notification added during this request
- `get($type)` - Return notifications from previous request
- `getCurrent($type)` - Return notifications from current request
- `getAll()` - Return all notifications from previous request
- `getAllCurrent()` - Return all notifications from current request

Following methods are available for each type (including custom type). Just replace `*` with notification type:

- `add*($text)` - Add notification
- `has*()` - Check if namespace contains any notification added in previous request
- `hasCurrent*()` - Check if namespace contains any notification added during this request
- `get*()` - Return notifications from previous request
- `getCurrent*()` - Return notifications from current request

Examples:

```
$this-notification()->addCustomType('This is custom type notification');
$this-notification()->addFoo('This is custom type notification');
$this-notification()->addBar('This is custom type notification');

$this-notification()->getCustomType();
$this-notification()->getFoo();
$this-notification()->getCurrentBar();

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3336d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6fefe17c3d39a1c8101950cabff9c74e435233df4e38c897708fa0ed6984baa?d=identicon)[szmnmichalowski](/maintainers/szmnmichalowski)

---

Top Contributors

[![szmnmichalowski](https://avatars.githubusercontent.com/u/10245000?v=4)](https://github.com/szmnmichalowski "szmnmichalowski (27 commits)")

---

Tags

extensionpluginsessionzend-frameworkpluginnotificationzendextension

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/szmnmichalowski-szm-notification/health.svg)

```
[![Health](https://phpackages.com/badges/szmnmichalowski-szm-notification/health.svg)](https://phpackages.com/packages/szmnmichalowski-szm-notification)
```

###  Alternatives

[kartik-v/yii2-widget-growl

A widget to generate growl based notifications using bootstrap-growl plugin (sub repo split from yii2-widgets)

384.2M14](/packages/kartik-v-yii2-widget-growl)[kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

284.1M24](/packages/kartik-v-yii2-widget-alert)[odaialali/yii2-toastr

This is the Toastr extension for Yii 2. It encapsulates Toastr plugin in terms of Yii widgets, and makes ajax notification easy to implement.

1486.3k](/packages/odaialali-yii2-toastr)

PHPackages © 2026

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