id; } public function getUser(): ?User { return $this->user; } public function setUser(User $user): void { $this->user = $user; } public function setName(string $name): void { $this->name = $name; } public function getName(): ?string { return $this->name; } public function setType(string $type): void { $this->type = $type; } public function getType(): ?string { return $this->type; } public function setContent(array $content): void { $this->content = json_encode($content); } public function getContent(): array { if ($this->content === null) { return []; } return json_decode($this->content, true); } public function __clone() { if ($this->id) { $this->id = null; } } }