. */ namespace SP\Core\Messages; /** * Class MessageBase * * @package SP\Core\Messages */ abstract class MessageBase implements MessageInterface { protected string $title = ''; protected array $footer = []; protected array $description = []; public static function factory(): MessageBase { return new static(); } public function getTitle(): string { return $this->title; } public function setTitle(string $title): MessageBase { $this->title = $title; return $this; } abstract public function getDescription( FormatterInterface $formatter, bool $translate ): string; public function setDescription(array $description): MessageBase { $this->description = $description; return $this; } public function addDescription(string $description): MessageBase { $this->description[] = $description; return $this; } public function getFooter(): array { return $this->footer; } public function setFooter(array $footer): MessageBase { $this->footer = $footer; return $this; } }