100 || preg_match( '/[^a-z0-9_:.\-]/', $id ) ) { throw new \InvalidArgumentException( 'Invalid follow-up action id.' ); } $this->id = $id; $this->kind = $kind; $this->label = substr( $label, 0, 190 ); $this->gatedByDefaultMail = $gatedByDefaultMail; $this->skipReason = $skipReason; $this->previousEntryRef = $previousEntryRef; } public function getPreviousEntryRef(): string { return $this->previousEntryRef; } public function getId(): string { return $this->id; } public function getKind(): string { return $this->kind; } public function getLabel(): string { return $this->label; } public function isGatedByDefaultMail(): bool { return $this->gatedByDefaultMail; } public function getSkipReason(): string { return $this->skipReason; } /** * Stable fingerprint of a plan: the sorted action ids. Stored with * every row so a later retry can tell whether the form's action set * changed since the plan was bound. * * @param FollowUpAction[] $actions */ public static function fingerprint( array $actions ): string { $ids = array(); foreach ( $actions as $action ) { $ids[] = $action->getId(); } sort( $ids ); return hash( 'sha256', implode( '|', $ids ) ); } }