mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
41 lines
666 B
PHP
41 lines
666 B
PHP
<?php
|
|
|
|
namespace Chill\MainBundle\Search;
|
|
|
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
|
|
|
class SearchApiResult
|
|
{
|
|
private float $pertinence;
|
|
|
|
private $result;
|
|
|
|
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;
|
|
}
|
|
}
|