PHPackages                             dtkahl/php-flash-messages - 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. dtkahl/php-flash-messages

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

dtkahl/php-flash-messages
=========================

1.1.0(10y ago)281MITPHPPHP &gt;=5.6.0

Since May 19Pushed 9y agoCompare

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

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/ed8bcb4ad7155e9596744626afa67f11e0eda8fb039aa4824cae7ca509ee0fad/68747470733a2f2f706f7365722e707567782e6f72672f64746b61686c2f7068702d666c6173682d6d657373616765732f762f737461626c65)](https://packagist.org/packages/dtkahl/php-flash-messages)[![License](https://camo.githubusercontent.com/d6c31b93e3981cf4e86f969601f083485f3db7983f682f2bb51d0b0d5e948a37/68747470733a2f2f706f7365722e707567782e6f72672f64746b61686c2f7068702d666c6173682d6d657373616765732f6c6963656e7365)](https://packagist.org/packages/dtkahl/php-flash-messagesK)[![Build Status](https://camo.githubusercontent.com/5a4881b09ba8ad47250c01e19f79a1c394281d70b8f4150a9579b070bf5c6740/68747470733a2f2f7472617669732d63692e6f72672f64746b61686c2f7068702d666c6173682d6d657373616765732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dtkahl/php-flash-messages)

PHP flash messages
==================

[](#php-flash-messages)

Session flash messages for PHP

Dependencies
------------

[](#dependencies)

- `PHP >= 5.6.0`

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

[](#installation)

Install with [Composer](http://getcomposer.org):

```
composer require dtkahl/php-flash-messages

```

Usage
-----

[](#usage)

```
session_start();
$flash = new \Dtkahl\FlashMessages\FlashMessages;
```

\**Warning:* Every new instance will be handled as new call and trunked data under given key in given store.

Methods
-------

[](#methods)

#### get($type, $key, $default = null)

[](#gettype-key-default--null)

Returns message with given `$type` and `$key` from last call or `$default` if there is no message.

**or call with predefined type:**

- getError($key, $default = null)
- getWarning($key, $default = null)
- getSuccess($key, $default = null)
- getInfo($key, $default = null)

#### has($type, $key)

[](#hastype-key)

Determine if there is any message with given `$type` and `$key` from last call.

**or call with predefined type:**

- hasError($key)
- hasWarning($key)
- hasSuccess($key)
- hasInfo($key)

#### set($type, $key, $value)

[](#settype-key-value)

Save message with given `$type` and `$key` to store for next call.

**or call with predefined type:**

- setError($key, $value)
- setWarning($key, $value)
- setSuccess($key, $value)
- setInfo($key, $value)

#### remove($type, $key)

[](#removetype-key)

Remove message with given `$type` and `$key` from store for next call.

**or call with predefined type:**

- removeError($key)
- removeWarning($key)
- removeSuccess($key)
- removeInfo($key)

#### removeAll($type)

[](#removealltype)

Remove all messages with given `$type` from store for next call.

**or call with predefined type:**

- removeError($key)
- removeWarning($key)
- removeSuccess($key)
- removeInfo($key)

#### getAll($type)

[](#getalltype)

Return an array of all messages with given `$type` from last call.

**or call with predefined type:**

- getAllError()
- getAllWarning()
- getAllSuccess()
- getAllInfo()

#### getAllTypes()

[](#getalltypes)

Return an array of all types and their messages from last call.

#### hasAny($type)

[](#hasanytype)

Determine if there is any messages with given `$type` from last call.

**or call with predefined type:**

- hasAnyError()
- hasAnyWarning()
- hasAnySuccess()
- hasAnyInfo()

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~0 days

Total

4

Last Release

3692d ago

Major Versions

0.1.0 → 1.0.02016-05-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67396034?v=4)[dtkahl](/maintainers/dtkahl)[@dtkahl](https://github.com/dtkahl)

---

Top Contributors

[![dantodev](https://avatars.githubusercontent.com/u/13280775?v=4)](https://github.com/dantodev "dantodev (15 commits)")

---

Tags

flash-messagesphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dtkahl-php-flash-messages/health.svg)

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

###  Alternatives

[maherelgamil/arabicdatetime

Easy and useful tool to generate arabic or hijri date with multi-language support for laravel

414.6k](/packages/maherelgamil-arabicdatetime)

PHPackages © 2026

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