PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.6.2
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.6.2
5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 All 38 releases
double-opt-in / src / FollowUp / FollowUpAttempt.php

FollowUpAttempt.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 5.6.2, at src/FollowUp/FollowUpAttempt.php

57 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Correlation data for one execution attempt.
4 *
5 * @package Forge12\DoubleOptIn\FollowUp
6 * @since 5.6.0
7 */
8
9 declare( strict_types=1 );
10
11 namespace Forge12\DoubleOptIn\FollowUp;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * One attempt groups the actions claimed together in a single run.
19 *
20 * The attempt id is for correlation only (logs, audit, replay ticket).
21 * It is NOT the idempotency key — that is (opt-in id, action id).
22 */
23 final class FollowUpAttempt {
24
25 public const TRIGGER_CONFIRM = 'confirm';
26 public const TRIGGER_CRON = 'cron';
27 public const TRIGGER_MANUAL = 'manual';
28 public const TRIGGER_LEGACY = 'legacy_hook';
29
30 /** @var string */
31 private $id;
32
33 /** @var string */
34 private $trigger;
35
36 /** @var int */
37 private $optInId;
38
39 public function __construct( string $id, string $trigger, int $optInId ) {
40 $this->id = $id;
41 $this->trigger = $trigger;
42 $this->optInId = $optInId;
43 }
44
45 public function getId(): string {
46 return $this->id;
47 }
48
49 public function getTrigger(): string {
50 return $this->trigger;
51 }
52
53 public function getOptInId(): int {
54 return $this->optInId;
55 }
56 }
57