Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
mailpoet
/
lib
/
Automation
/
Engine
/
Control
/
Steps
:
ActionStepRunner.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php declare(strict_types = 1); namespace MailPoet\Automation\Engine\Control\Steps; if (!defined('ABSPATH')) exit; use MailPoet\Automation\Engine\Control\StepRunner; use MailPoet\Automation\Engine\Data\StepRunArgs; use MailPoet\Automation\Engine\Data\StepValidationArgs; use MailPoet\Automation\Engine\Exceptions\InvalidStateException; use MailPoet\Automation\Engine\Registry; class ActionStepRunner implements StepRunner { /** @var Registry */ private $registry; public function __construct( Registry $registry ) { $this->registry = $registry; } public function run(StepRunArgs $runArgs, StepValidationArgs $validationArgs): void { $action = $this->registry->getAction($runArgs->getStep()->getKey()); if (!$action) { throw new InvalidStateException(); } $action->validate($validationArgs); $action->run($runArgs); } }