*/ final class UnsubscribeTracking { private $active; private $htmlFooter; private $textFooter; public static function create(array $data): self { $model = new self(); $model->active = ($data['active'] ?? null) ? 'yes' : 'no'; $model->htmlFooter = $data['html_footer'] ?? ''; $model->textFooter = $data['text_footer'] ?? ''; return $model; } private function __construct() { } public function isActive(): bool { return 'yes' === $this->getActive(); } public function getActive(): string { return $this->active; } public function getHtmlFooter(): string { return $this->htmlFooter; } public function getTextFooter(): string { return $this->textFooter; } }