PHPackages                             cupoftea/chain - 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. cupoftea/chain

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

cupoftea/chain
==============

Call a chain of methods on an object

v1.2.1(10y ago)0831MITPHP

Since Jul 9Pushed 9y ago1 watchersCompare

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

READMEChangelog (6)Dependencies (1)Versions (8)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/0cc8ec8cd38ce8b26d77363f18f85ddfb5933ca9cb9ed98d1f01b774e80b5e5d/68747470733a2f2f706f7365722e707567782e6f72672f6375706f667465612f636861696e2f76657273696f6e2e737667)](https://packagist.org/packages/cupoftea/chain) [![Total Downloads](https://camo.githubusercontent.com/9175ef8869cf03a0b2acb64fe4fa4890dafb0bf79959d7b13b776c4b5a403a65/68747470733a2f2f706f7365722e707567782e6f72672f6375706f667465612f636861696e2f642f746f74616c2e737667)](https://packagist.org/packages/cupoftea/chain)[![Latest Unstable Version](https://camo.githubusercontent.com/7a971bb1b0f3b822f0632a955f370a97400aa22502e052cb99a4698767dd80bb/68747470733a2f2f706f7365722e707567782e6f72672f6375706f667465612f636861696e2f762f756e737461626c652e737667)](https://packagist.org/packages/cupoftea/chain)[![StyleCI](https://camo.githubusercontent.com/d65894fce0c3edc0c32387e31b3779aca04516e84b0504f82367f5538d65c06c/68747470733a2f2f7374796c6563692e696f2f7265706f732f33383833363237342f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/38836274) [![License](https://camo.githubusercontent.com/d09612504c97be4acacae2b4c822f5a3ca2fafdaed257a79aed0d529d021fcb8/68747470733a2f2f706f7365722e707567782e6f72672f6375706f667465612f636861696e2f6c6963656e73652e737667)](https://packagist.org/packages/cupoftea/chain)

Chain
=====

[](#chain)

Call a chain of methods on an object.
-------------------------------------

[](#call-a-chain-of-methods-on-an-object)

Chain provides an easy way to chain a set of methods on an object.

Chain provides a set of methods to suit your chaining needs. From requiring you class to be an instance of an earlier specified class to getting back the results from each called method, Chain's got it all. For more info, check the Documentation or browse through the full API.

- [Documentation](http://chain.cupoftea.io/docs/)
- [API Reference](http://chain.cupoftea.io/docs/api/)

Quickstart
----------

[](#quickstart)

```
$ composer require cupoftea/chain ^1.2
```

```
$chain = new Chain();
$chain->requires(MyInterface::class)
    ->on(MyClass::class))
    ->call('method1', 'method2')
    ->with($parameter1, $parameter2)
    ->run();

$method1_result = $chain->getResult('method1');
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

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

6

Last Release

3964d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2977bc0c1a9c62466102bce06ba22bca2897d5a0176087f2c6d8924e55f60c42?d=identicon)[CupOfTea696](/maintainers/CupOfTea696)

---

Top Contributors

[![CupOfTea696](https://avatars.githubusercontent.com/u/7327050?v=4)](https://github.com/CupOfTea696 "CupOfTea696 (29 commits)")

---

Tags

chaincomposer-packagespackagephptoolmethodchaining

### Embed Badge

![Health badge](/badges/cupoftea-chain/health.svg)

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[clagiordano/weblibs-configmanager

weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object

163.5M9](/packages/clagiordano-weblibs-configmanager)[rybakit/arguments-resolver

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

26107.7k7](/packages/rybakit-arguments-resolver)

PHPackages © 2026

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