项目作者: CupOfTea696

项目描述 :
Call a chain of methods on an object
高级语言: PHP
项目地址: git://github.com/CupOfTea696/Chain.git
创建时间: 2015-07-09T17:55:17Z
项目社区:https://github.com/CupOfTea696/Chain

开源协议:MIT License

下载


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

  1. $ composer require cupoftea/chain ^1.2
  1. $chain = new Chain();
  2. $chain->requires(MyInterface::class)
  3. ->on(MyClass::class))
  4. ->call('method1', 'method2')
  5. ->with($parameter1, $parameter2)
  6. ->run();
  7. $method1_result = $chain->getResult('method1');