$this->events, 'status' => $this->isPublished, 'title' => $this->title, ]); } public function setEvents(array $events): self { $this->events = $events; return $this; } public function setPublished(bool $isPublished = TRUE): self { $this->isPublished = $isPublished; return $this; } public static function create(string $title): self { return new self($title); } }