Automation.php
2 months ago
AutomationRun.php
1 year ago
AutomationRunLog.php
1 year ago
AutomationStatistics.php
9 months ago
AutomationTemplate.php
6 months ago
AutomationTemplateCategory.php
2 years ago
Field.php
2 years ago
Filter.php
3 years ago
FilterGroup.php
2 months ago
Filters.php
2 months ago
NextStep.php
2 years ago
Step.php
2 months ago
StepRunArgs.php
2 years ago
StepValidationArgs.php
3 years ago
Subject.php
3 years ago
SubjectEntry.php
3 years ago
index.php
3 years ago
NextStep.php
32 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Automation\Engine\Data; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | class NextStep { |
| 9 | /** @var string|null */ |
| 10 | protected $id; |
| 11 | |
| 12 | public function __construct( |
| 13 | ?string $id |
| 14 | ) { |
| 15 | $this->id = $id; |
| 16 | } |
| 17 | |
| 18 | public function getId(): ?string { |
| 19 | return $this->id; |
| 20 | } |
| 21 | |
| 22 | public function toArray(): array { |
| 23 | return [ |
| 24 | 'id' => $this->id, |
| 25 | ]; |
| 26 | } |
| 27 | |
| 28 | public static function fromArray(array $data): self { |
| 29 | return new self($data['id']); |
| 30 | } |
| 31 | } |
| 32 |