Implerment depth-first pre-order workflow graph walker with plug-in node visitors
[MAILPOET-4629]
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user