cupoftea/chain

Call a chain of methods on an object

Maintainers

👁 CupOfTea696

Package info

github.com/CupOfTea696/Chain

pkg:composer/cupoftea/chain

Statistics

Installs: 83

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.1 2015-07-11 23:37 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 565f1fed834a6a46385f09f77a6fd39d90ce3e85

  • CupOfTea696 <cupoftea696.woop@gmail.com>

toolmethodchaining

This package is auto-updated.

Last update: 2026-06-12 07:20:56 UTC


README

👁 Latest Stable Version
👁 Total Downloads
👁 Latest Unstable Version
👁 StyleCI
👁 License

Chain

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.

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');