Files
Nominatim/lib-php/TokenWord.php
Sarah Hoffmann 6070c3d1d5 introduce a separate token type for partials
This means that the leading space can be removed as a partial
word indicator.
2021-07-13 16:57:12 +02:00

36 lines
819 B
PHP

<?php
namespace Nominatim\Token;
/**
* A standard word token.
*/
class Word
{
/// Database word id, if applicable.
public $iId;
/// Number of appearances in the database.
public $iSearchNameCount;
/// Number of terms in the word.
public $iTermCount;
public function __construct($iId, $iSearchNameCount, $iTermCount)
{
$this->iId = $iId;
$this->iSearchNameCount = $iSearchNameCount;
$this->iTermCount = $iTermCount;
}
public function debugInfo()
{
return array(
'ID' => $this->iId,
'Type' => 'word',
'Info' => array(
'count' => $this->iSearchNameCount,
'terms' => $this->iTermCount
)
);
}
}