PHP 8.2.31
Preview: Hooks.php Size: 1.84 KB
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/Automation/Engine/Hooks.php

<?php declare(strict_types = 1);

namespace MailPoet\Automation\Engine;

if (!defined('ABSPATH')) exit;


use MailPoet\Automation\Engine\Data\Automation;
use MailPoet\Automation\Engine\Data\AutomationRunLog;
use MailPoet\Automation\Engine\Data\Step;

class Hooks {
  /** @var WordPress */
  private $wordPress;

  public function __construct(
    WordPress $wordPress
  ) {
    $this->wordPress = $wordPress;
  }

  public const INITIALIZE = 'mailpoet/automation/initialize';
  public const API_INITIALIZE = 'mailpoet/automation/api/initialize';
  public const STEP_RUNNER_INITIALIZE = 'mailpoet/automation/step_runner/initialize';
  public const TRIGGER = 'mailpoet/automation/trigger';
  public const AUTOMATION_STEP = 'mailpoet/automation/step';

  public const EDITOR_BEFORE_LOAD = 'mailpoet/automation/editor/before_load';

  public const AUTOMATION_BEFORE_SAVE = 'mailpoet/automation/before_save';
  public const AUTOMATION_STEP_BEFORE_SAVE = 'mailpoet/automation/step/before_save';

  public const AUTOMATION_RUN_LOG_AFTER_STEP_RUN = 'mailpoet/automation/step/after_run';

  public const AUTOMATION_RUN_CREATE = 'mailpoet/automation/run/create';

  public const AUTOMATION_TEMPLATES = 'mailpoet/automation/templates';

  public function doAutomationBeforeSave(Automation $automation): void {
    $this->wordPress->doAction(self::AUTOMATION_BEFORE_SAVE, $automation);
  }

  public function doAutomationStepBeforeSave(Step $step): void {
    $this->wordPress->doAction(self::AUTOMATION_STEP_BEFORE_SAVE, $step);
  }

  public function doAutomationStepByKeyBeforeSave(Step $step): void {
    $this->wordPress->doAction(self::AUTOMATION_STEP_BEFORE_SAVE . '/key=' . $step->getKey(), $step);
  }

  public function doAutomationStepAfterRun(AutomationRunLog $automationRunLog): void {
    $this->wordPress->doAction(self::AUTOMATION_RUN_LOG_AFTER_STEP_RUN, $automationRunLog);
  }
}

Directory Contents

Dirs: 11 × Files: 7

Name Size Perms Modified Actions
API DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Builder DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Control DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Data DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Endpoints DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Mappers DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Storage DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Utils DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
3.13 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
12.02 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.84 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
186 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
3.53 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
905 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).