PHPackages                             phug/invoker - 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. phug/invoker

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

phug/invoker
============

Typing-based invoker

2.0.1(2y ago)01111MITPHPPHP &gt;=5.5.0

Since Jan 13Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/phug-php/invoker)[ Packagist](https://packagist.org/packages/phug/invoker)[ Docs](http://phug-lang.com)[ GitHub Sponsors](https://github.com/kylekatarnls)[ Fund](https://opencollective.com/pug-php)[ RSS](/packages/phug-invoker/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (41)Used By (1)

Phug Invoker
============

[](#phug-invoker)

What is Phug Invoker?
---------------------

[](#what-is-phug-invoker)

Register callbacks with argument class typing and call the invoker to execute only the ones that match a given object.

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

[](#installation)

Install via Composer

```
composer require phug/invoker
```

Usage
-----

[](#usage)

```
class Foo {}
class Bar {}

$invoker = new \Phug\Invoker([
    function (Foo $foo) {
        return 'foo';
    },
    function (Bar $bar) {
        return 'BAR';
    },
]);

$invoker->invoke(new Foo); // ['foo']
$invoker->invoke(new Bar); // ['BAR']
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance58

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

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 ~70 days

Recently: every ~165 days

Total

20

Last Release

989d ago

Major Versions

1.12.3 → 2.0.12023-09-02

### Community

Maintainers

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

---

Top Contributors

[![kylekatarnls](https://avatars.githubusercontent.com/u/5966783?v=4)](https://github.com/kylekatarnls "kylekatarnls (8 commits)")

---

Tags

invokeinvokerphug

### Embed Badge

![Health badge](/badges/phug-invoker/health.svg)

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

###  Alternatives

[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)[rybakit/arguments-resolver

ArgumentsResolver allows you to determine the arguments to pass to a function or method.

26107.7k7](/packages/rybakit-arguments-resolver)[eyecatchup/webmaster-tools-data

An easy way to automate downloading of data tables from Google Webmaster Tools

1052.1k](/packages/eyecatchup-webmaster-tools-data)

PHPackages © 2026

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