PHPackages                             sminnee/callbacklist - 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. sminnee/callbacklist

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

sminnee/callbacklist
====================

PHP class that manages a list of callbacks

0.1.1(5y ago)21.9M↓11.4%2[2 issues](https://github.com/sminnee/callbacklist/issues)1MITPHPPHP ^7.1 || ^8

Since Sep 17Pushed 5y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (6)Versions (3)Used By (1)

sminnee/callbacklist
====================

[](#sminneecallbacklist)

[![Build Status](https://camo.githubusercontent.com/8540a713613b42c455597b3b4b4c0f350e06d6121ed75b7e77b4a539cc7b5b20/68747470733a2f2f7472617669732d63692e6f72672f736d696e6e65652f63616c6c6261636b6c6973742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sminnee/callbacklist)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/28ed2d6ea0bbe1c1a1117c85d8f7be526a08c208e0d57032abba5eb1b979885d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736d696e6e65652f63616c6c6261636b6c6973742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sminnee/callbacklist/?branch=master)[![codecov.io](https://camo.githubusercontent.com/e54b8d05339ea7c463d3c7566db024ce5c03a501983220fc8f27cf1d48a80b96/68747470733a2f2f636f6465636f762e696f2f6769746875622f736d696e6e65652f63616c6c6261636b6c6973742f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/sminnee/callbacklist?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/de855a286df377dc4cd6ab64a7832ee92b69490f4d6fc4416b71e10a64b0c6cd/68747470733a2f2f706f7365722e707567782e6f72672f736d696e6e65652f63616c6c6261636b6c6973742f76657273696f6e)](https://packagist.org/packages/sminnee/callbacklist)[![License](https://camo.githubusercontent.com/16862e4be1d6fb68c27a7309a96c9d0f3f25b29f83d735a79cc5e4a72733f545/68747470733a2f2f706f7365722e707567782e6f72672f736d696e6e65652f63616c6c6261636b6c6973742f6c6963656e7365)](https://packagist.org/packages/sminnee/callbacklist)[![Monthly Downloads](https://camo.githubusercontent.com/66c147b6862298ee35879091ee5106543f61211f68a9b33a343cbdde0a59a092/68747470733a2f2f706f7365722e707567782e6f72672f736d696e6e65652f63616c6c6261636b6c6973742f642f6d6f6e74686c79)](https://packagist.org/packages/sminnee/callbacklist)

[![GitHub Code Size](https://camo.githubusercontent.com/6f86bb06943eee14456842bf4a85e0466862f5ace90378f4bfe50bfbcc56319b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f736d696e6e65652f63616c6c6261636b6c697374)](https://github.com/sminnee/callbacklist)[![GitHub Last Commit](https://camo.githubusercontent.com/f833c900f142d922c946c87a0975baa9a0b08a8cc3abedc8ce9329fcdb8adcc0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f736d696e6e65652f63616c6c6261636b6c697374)](https://github.com/sminnee/callbacklist)[![GitHub Activity](https://camo.githubusercontent.com/46deb5028cbd4d7fc49683c1d3508ea177346802648cb7799610ce4848fc9ea4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f736d696e6e65652f63616c6c6261636b6c697374)](https://github.com/sminnee/callbacklist)[![GitHub Issues](https://camo.githubusercontent.com/bda3240be65c5c173dde9a934a8b81eb880afa2b0d8fd5e12e290c8ffd33b4e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f736d696e6e65652f63616c6c6261636b6c697374)](https://github.com/sminnee/callbacklist/issues)

This micropackage provides a simple class for managing a list of callbacks.

Usage
-----

[](#usage)

```
> composer require sminnee/callbacklist

```

```
use Sminnee\CallbackList\CallbackList;

$list = new CallbackList;
$list->add(function() { "this will get called"; });
$list->add(function() { "so will this"; });
$list->call();

// Or you can use it as a callable if you prefer
$list();
```

Arguments can be passed:

```
$list->add(function($greeting) { "$greeting, world!"; });
$list("Hello");
```

Return values are collated as an array

```
use Sminnee\CallbackList\CallbackList;

$list = new CallbackList;
$list->add(function() { return "this will get returned"; });
$list->add(function() { return "so will this"; });

// ["this will get returned", "so will this"]
var_dump($list());
```

Existing callbacks can be manipulated:

```
// Clear the list
$list->clear();

// Or add a callback with a name
$list->add(function($greeting) { "$greeting, world!"; }, 'greeter');

// And then remove by that name
$list->remove('greeter');
```

And you can inspect the content of the list:

```
// Return a single named callback
$list->get('greeter');

// Return everything as an array
$list->getAll();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity40

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

Every ~79 days

Total

2

Last Release

1989d ago

PHP version history (2 changes)0.1.0PHP ^7.1 || 8

0.1.1PHP ^7.1 || ^8

### Community

Maintainers

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

---

Top Contributors

[![gordonbanderson](https://avatars.githubusercontent.com/u/7060?v=4)](https://github.com/gordonbanderson "gordonbanderson (4 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (2 commits)")[![3Dgoo](https://avatars.githubusercontent.com/u/2616373?v=4)](https://github.com/3Dgoo "3Dgoo (1 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sminnee-callbacklist/health.svg)

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

###  Alternatives

[contributte/forms-multiplier

Multiplier for nette forms

281.4M3](/packages/contributte-forms-multiplier)

PHPackages © 2026

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