mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-30 22:09:31 +03:00
36 lines
841 B
PHP
36 lines
841 B
PHP
<?php
|
|
|
|
namespace Nominatim\Token;
|
|
|
|
/**
|
|
* A standard word token.
|
|
*/
|
|
class Word
|
|
{
|
|
/// Database word id, if applicable.
|
|
public $iId;
|
|
/// If true, the word may represent only part of a place name.
|
|
public $bPartial;
|
|
/// Number of appearances in the database.
|
|
public $iSearchNameCount;
|
|
|
|
public function __construct($iId, $bPartial, $iSearchNameCount)
|
|
{
|
|
$this->iId = $iId;
|
|
$this->bPartial = $bPartial;
|
|
$this->iSearchNameCount = $iSearchNameCount;
|
|
}
|
|
|
|
public function debugInfo()
|
|
{
|
|
return array(
|
|
'ID' => $this->iId,
|
|
'Type' => 'word',
|
|
'Info' => array(
|
|
'partial' => $this->bPartial,
|
|
'count' => $this->iSearchNameCount
|
|
)
|
|
);
|
|
}
|
|
}
|