mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-16 23:34:23 +00:00
45 lines
722 B
PHP
45 lines
722 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\MainBundle\Search;
|
|
|
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
|
|
|
class SearchApiResult
|
|
{
|
|
private float $pertinence;
|
|
|
|
private $result;
|
|
|
|
private float $relevance;
|
|
|
|
public function __construct(float $relevance)
|
|
{
|
|
$this->relevance = $relevance;
|
|
}
|
|
|
|
public function setResult($result): self
|
|
{
|
|
$this->result = $result;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @Serializer\Groups({"read"})
|
|
*/
|
|
public function getResult()
|
|
{
|
|
return $this->result;
|
|
}
|
|
|
|
/**
|
|
* @Serializer\Groups({"read"})
|
|
*/
|
|
public function getRelevance(): float
|
|
{
|
|
return $this->relevance;
|
|
}
|
|
}
|