From 45ed9329da0c90df96a3079d7067db6fd5264be0 Mon Sep 17 00:00:00 2001 From: brabli <67018167+brabli@users.noreply.github.com> Date: Thu, 7 May 2026 17:10:54 +0100 Subject: [PATCH] Add types, add docblocks, minor tweaks --- src/Entity/SearchIndex.php | 74 ++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/src/Entity/SearchIndex.php b/src/Entity/SearchIndex.php index 7046ee9..81b42a6 100644 --- a/src/Entity/SearchIndex.php +++ b/src/Entity/SearchIndex.php @@ -1,5 +1,7 @@ id; } - public function getEntityClass(): ?string + /** + * The fully-qualified class name of the indexed entity. + */ + public function getEntityClass(): string { return $this->entityClass; } - public function setEntityClass(string $entityClass): self - { - $this->entityClass = $entityClass; - - return $this; - } - - public function getEntityId(): ?int + /** + * The primary key of the indexed entity within its own table. + */ + public function getEntityId(): int { return $this->entityId; } - public function setEntityId(int $entityId): self + /** + * The concatenated searchable text for this entity. This is the value + * the fulltext index is matched against. + */ + public function getSearchText(): string { - $this->entityId = $entityId; + return $this->searchText; + } + + public function setSearchText(string $searchText): self + { + $this->searchText = $searchText; return $this; } - public function getData(): ?string - { - return $this->data; - } - - public function setData(string $data): self - { - $this->data = $data; - - return $this; - } - - public function getTitle(): ?string + /** + * The human-readable title to display for this hit in search results. + */ + public function getTitle(): string { return $this->title; }