headline = $headline; $this->img = $img; $this->url = $url; $this->source = $source; $this->via = $via; $this->timestamp = $timestamp; if (is_null($category)) { $this->category = new NewsCategory(NewsCategory::GENERAL); } else { $this->category = $category; } } function getImage(): string { return $this->img; } function getURL(): string { return $this->url; } function getHeadline(): string { return $this->headline; } function getSource(): string { return $this->source; } function getVia(): string { return $this->via; } function getTimestamp(): int { return $this->timestamp; } function getCategory(): \NewsCategory { return $this->category; } }