*/ #[ORM\OneToMany(mappedBy: 'podcast', targetEntity: PodcastCategory::class)] protected Collection $categories; /** @var Collection */ #[ORM\OneToMany(mappedBy: 'podcast', targetEntity: PodcastEpisode::class)] protected Collection $episodes; public function __construct(StorageLocation $storageLocation) { $this->storage_location = $storageLocation; $this->categories = new ArrayCollection(); $this->episodes = new ArrayCollection(); } public function getStorageLocation(): StorageLocation { return $this->storage_location; } public function getTitle(): string { return $this->title; } public function setTitle(string $title): self { $this->title = $this->truncateString($title); return $this; } public function getLink(): ?string { return $this->link; } public function setLink(?string $link): self { $this->link = $this->truncateNullableString($link); return $this; } public function getDescription(): string { return $this->description; } public function setDescription(string $description): self { $this->description = $this->truncateString($description, 4000); return $this; } public function getLanguage(): string { return $this->language; } public function setLanguage(string $language): self { $this->language = $this->truncateString($language); return $this; } public function getAuthor(): string { return $this->author; } public function setAuthor(string $author): self { $this->author = $this->truncateString($author); return $this; } public function getEmail(): string { return $this->email; } public function setEmail(string $email): self { $this->email = $this->truncateString($email); return $this; } public function getArtUpdatedAt(): int { return $this->art_updated_at; } public function setArtUpdatedAt(int $art_updated_at): self { $this->art_updated_at = $art_updated_at; return $this; } /** * @return Collection */ public function getCategories(): Collection { return $this->categories; } /** * @return Collection */ public function getEpisodes(): Collection { return $this->episodes; } public static function getArtPath(string $uniqueId): string { return self::DIR_PODCAST_ARTWORK . '/' . $uniqueId . '.jpg'; } }