AutomationNode.php
3 years ago
AutomationNodeVisitor.php
3 years ago
AutomationWalker.php
2 months ago
index.php
3 years ago
AutomationNode.php
35 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Automation\Engine\Validation\AutomationGraph; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Automation\Engine\Data\Step; |
| 9 | |
| 10 | class AutomationNode { |
| 11 | /** @var Step */ |
| 12 | private $step; |
| 13 | |
| 14 | /** @var array */ |
| 15 | private $parents; |
| 16 | |
| 17 | /* @param Step[] $parents */ |
| 18 | public function __construct( |
| 19 | Step $step, |
| 20 | array $parents |
| 21 | ) { |
| 22 | $this->step = $step; |
| 23 | $this->parents = $parents; |
| 24 | } |
| 25 | |
| 26 | public function getStep(): Step { |
| 27 | return $this->step; |
| 28 | } |
| 29 | |
| 30 | /** @return Step[] */ |
| 31 | public function getParents(): array { |
| 32 | return $this->parents; |
| 33 | } |
| 34 | } |
| 35 |