src/Biz/OrderFacade/Command/Deduct/PickedDeductWrapper.php
(开头部分) 916B这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\OrderFacade\Command\Deduct;
use Biz\OrderFacade\Command\Command;
use Biz\OrderFacade\Product\Product;
use Codeages\Biz\Framework\Context\BizAware;
class PickedDeductWrapper extends BizAware
{
/**
* @var Command[][]
*/
private $commands;
public function addCommand(Command $command, $priority = 1)
{
$command->setBiz($this->biz);
$this->commands[] = array(
'command' => $command,
'priority' => $priority,
);
uasort($this->commands, function ($a1, $a2) {
return $a1['priority'] < $a2['priority'];
});
}
public function wrapper(Product $product, $params)
{
$commands = $this->commands;
if (empty($commands)) {
return;
}
foreach ($commands as $command) {
$command['command']->execute($product, $params);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。