轻松链接任何对象

0.0.1 2018-11-15 08:12 UTC

This package is auto-updated.

Last update: 2024-09-15 22:57:29 UTC


README

composer require tommyknocker/chain

不修改任何类的库,用于链接每个类。

示例

use Tommyknocker/Chain/Chain;

Chain::YourObject('param1','param2)
    ->currentObjectMethod('param2')
    ->change('SomeOtherObjects', $args)
    ->otherObjectMethod();
    
//To access current method result you may use:
Chain::YourObject('param1','param2)->result;
  
//To access current object instance you may use
Chain::YourObject('param1','param2)->instance;      

计划

  • 使用外部DI
  • 使用不同命名空间的对象测试库