id; } public function getBaseUrl(): ?string { return $this->baseUrl; } public function setBaseUrl(string $baseUrl): static { $this->baseUrl = $baseUrl; return $this; } public function getImageSelector(): ?string { return $this->imageSelector; } public function setImageSelector(string $imageSelector): static { $this->imageSelector = $imageSelector; return $this; } public function getNextPageSelector(): ?string { return $this->NextPageSelector; } public function setNextPageSelector(?string $NextPageSelector): static { $this->NextPageSelector = $NextPageSelector; return $this; } public function getChapterUrlFormat(): ?string { return $this->chapterUrlFormat; } public function setChapterUrlFormat(string $chapterUrlFormat): static { $this->chapterUrlFormat = $chapterUrlFormat; return $this; } public function getChapterUrl(string $mangaTitle, float $chapterNumber): string { $urlGenerator = new ChapterUrlGenerator($this->chapterUrlFormat); return $urlGenerator->getChapterUrl($mangaTitle, $chapterNumber); } public function getScrapingType(): ?string { return $this->scrapingType; } public function setScrapingType(string $scrapingType): static { $this->scrapingType = $scrapingType; return $this; } public function getChapterSelector(): ?string { return $this->ChapterSelector; } public function setChapterSelector(?string $ChapterSelector): static { $this->ChapterSelector = $ChapterSelector; return $this; } public function getCleanBaseUrl(): string { return preg_replace( '/^(https?:\/\/)?(www\.)?|\/+$/', '', $this->baseUrl ); } }