總結下自己的寫的一些個人認為比較好的代碼片段
1、管道模式
1)檔案:PipelineInterface.php
interface PipelineInterface
{
public function __construct($payLoad);
public function pipe(StageInterface $stage);
public function process();
}
2)檔案:StageInterface.php
interface StageInterface
{
public function handle($data);
public function goNext($next,$result);
}