Implerment depth-first pre-order workflow graph walker with plug-in node visitors

[MAILPOET-4629]
This commit is contained in:
Jan Jakes
2022-09-14 15:10:18 +02:00
committed by David Remer
parent e3668a8187
commit e472c00b1c
6 changed files with 264 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<?php declare(strict_types = 1);
namespace MailPoet\Automation\Engine\Validation\WorkflowGraph;
use MailPoet\Automation\Engine\Data\Step;
class WorkflowNode {
/** @var Step */
private $step;
/** @var array */
private $parents;
/* @param Step[] $parents */
public function __construct(
Step $step,
array $parents
) {
$this->step = $step;
$this->parents = $parents;
}
public function getStep(): Step {
return $this->step;
}
/** @return Step[] */
public function getParents(): array {
return $this->parents;
}
}