$details 엔진별 부가 정보 (표시 전용) * @param array $context 재생성에 필요한 엔진 내부 정보 */ public function __construct( public string $driver, public string $identifier, public SearchIndexStatus $status, public string $measurement = '', public array $details = [], public array $context = [], ) {} /** * 재생성 대상인지 여부. * * @return bool */ public function needsRebuild(): bool { return $this->status === SearchIndexStatus::Stale; } /** * 기계 판독용 배열로 반환합니다. * * `context` 는 엔진 내부 정보라 응답에 싣지 않습니다. * * @return array */ public function toArray(): array { return [ 'driver' => $this->driver, 'identifier' => $this->identifier, 'status' => $this->status->value, 'status_label' => $this->status->label(), 'measurement' => $this->measurement, 'details' => $this->details, ]; } }