mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
70 lines
1.1 KiB
PHP
70 lines
1.1 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2013 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Alchemy\Phrasea\SearchEngine;
|
|
|
|
class SearchEngineSuggestion
|
|
{
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $query;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $suggestion;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
private $hits;
|
|
|
|
public function __construct($query, $suggestion, $hits)
|
|
{
|
|
$this->query = $query;
|
|
$this->suggestion = $suggestion;
|
|
$this->hits = (int) $hits;
|
|
}
|
|
|
|
/**
|
|
* The query related to the suggestion
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getQuery()
|
|
{
|
|
return $this->query;
|
|
}
|
|
|
|
/**
|
|
* The actual suggestion
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getSuggestion()
|
|
{
|
|
return $this->suggestion;
|
|
}
|
|
|
|
/**
|
|
* The number of hits
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getHits()
|
|
{
|
|
return $this->hits;
|
|
}
|
|
|
|
}
|