2021-07-13 17:54:51 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Nominatim\Token;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A standard word token.
|
|
|
|
*/
|
|
|
|
class Partial
|
|
|
|
{
|
|
|
|
/// Database word id, if applicable.
|
|
|
|
public $iId;
|
|
|
|
/// Number of appearances in the database.
|
|
|
|
public $iSearchNameCount;
|
2021-07-15 15:48:20 +03:00
|
|
|
/// Normalised version of the partial word.
|
|
|
|
public $sToken;
|
2021-07-13 17:54:51 +03:00
|
|
|
|
2021-07-15 15:48:20 +03:00
|
|
|
public function __construct($iId, $sToken, $iSearchNameCount)
|
2021-07-13 17:54:51 +03:00
|
|
|
{
|
|
|
|
$this->iId = $iId;
|
2021-07-15 15:48:20 +03:00
|
|
|
$this->sToken = $sToken;
|
2021-07-13 17:54:51 +03:00
|
|
|
$this->iSearchNameCount = $iSearchNameCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function debugInfo()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'ID' => $this->iId,
|
|
|
|
'Type' => 'partial',
|
|
|
|
'Info' => array(
|
|
|
|
'count' => $this->iSearchNameCount
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|