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

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

marcojetson/invoker
===================

Invoke callables using associative arrays

08PHP

Since May 30Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Invoker
=======

[](#invoker)

Invoke PHP callables using associative arrays

[![Build status](https://camo.githubusercontent.com/174282d490ca7a2bff5c7bd82187301a127b504fa0e32a1fe66d7d01f7f18735/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5048502d44492f496e766f6b65722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/marcojetson/invoker)[![Test coverage](https://camo.githubusercontent.com/2b71b14746d828175651d3a8f37bf36654d11d6209d2c7d7f72c145b4626a6c0/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d6172636f6a6574736f6e2f696e766f6b65722f6261646765732f636f7665726167652e7376673f6d6173746572)](https://codeclimate.com/github/marcojetson/invoker/coverage)

Usage
-----

[](#usage)

Use *invoke* providing a callable and the arguments as an associative array

```
function person($name, $age)
{
}

$invoker = new Invoker();
$invoker->invoke('person', ['age' => 29, 'name' => 'Marco']);
```

Supports optional arguments

```
function person($name, $age = 29)
{
}

$invoker = new Invoker();
$invoker->invoke('person', ['name' => 'Marco']);
```

Callables
---------

[](#callables)

In addition to PHP callables you can use the following forms as first argument:

- A class name implementing the \_\_*invoke* magic method
- A string containing *class::method*

You can implement Resolver interface and inject it into *Invoker*'s constructor for adding your own forms

```
$invoker = new Invoker(new MyResolver());
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[laravel-ready/license-connector

Connector package for License Server

351.8k](/packages/laravel-ready-license-connector)

PHPackages © 2026

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