ehough/chaingang
Composer 安装命令:
composer require ehough/chaingang
包简介
Chain-of-Responsibility / Chain-of-Command pattern in PHP.
README 文档
README
Chain-of-Responsibility/Chain-of-Command pattern for PHP 5.2+
Sample Usage
/* * Build some commands. */ $command1 = new MyCommand1(); //implements ehough_chaingang_api_Command $command2 = new MyCommand2(); //implements ehough_chaingang_api_Command /* * Build and assemble the chain. */ $chain = new ehough_chaingang_impl_StandardChain(); $chain->addCommand($command1); $chain->addCommand($command2); /* * Build the execution context. */ $context = new ehough_chaingang_impl_StandardContext(); $context->put('foo', 'bar'); /* * Execute the chain. */ $successfullyHandled = $chain->execute($context);
统计信息
- 总下载量: 6.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2012-07-11