for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SRIO\ChainOfResponsibility;
final class ChainProcessDecorator implements ChainProcessInterface
{
/**
* @var ChainProcessInterface
*/
private $process;
private $nextProcess;
* @param ChainProcessInterface $process
* @param ChainProcessInterface $nextProcess
public function __construct(ChainProcessInterface $process, ChainProcessInterface $nextProcess = null)
$this->process = $process;
$this->nextProcess = $nextProcess;
}
* {@inheritdoc}
public function execute(ChainContext $context)
$this->process->execute($context);
if (null !== $this->nextProcess) {
$this->nextProcess->execute($context);