id = $id; $this->type = $type; $this->link = $link; $this->title = $title; $this->score = $score; $this->engineName = $engineName; } /** @return string */ public function getId(): string { return $this->id; } /** @return string */ public function getType(): string { return $this->type; } /** @return string */ public function getLink(): string { return $this->link; } /** @return string */ public function getTitle(): string { return $this->title; } /** @return float */ public function getScore(): float { return $this->score; } /** @return string */ public function getEngineName(): string { return $this->engineName; } /** * Convert to the legacy associative array used by existing pipeline code. * * @return array{id: string, type: string, link: string, title: string, score: float, engine: string} */ public function toLegacyArray(): array { return [ 'id' => $this->id, 'type' => $this->type, 'link' => $this->link, 'title' => $this->title, 'score' => $this->score, 'engine' => $this->engineName, ]; } }