]> git.openstreetmap.org Git - nominatim.git/blob - lib-php/TokenWord.php
remove special status of partial tokens
[nominatim.git] / lib-php / TokenWord.php
1 <?php
2
3 namespace Nominatim\Token;
4
5 /**
6  * A standard word token.
7  */
8 class Word
9 {
10     /// Database word id, if applicable.
11     public $iId;
12     /// Number of appearances in the database.
13     public $iSearchNameCount;
14     /// Number of terms in the word.
15     public $iTermCount;
16
17     public function __construct($iId, $iSearchNameCount, $iTermCount)
18     {
19         $this->iId = $iId;
20         $this->iSearchNameCount = $iSearchNameCount;
21         $this->iTermCount = $iTermCount;
22     }
23
24     public function debugInfo()
25     {
26         return array(
27                 'ID' => $this->iId,
28                 'Type' => 'word',
29                 'Info' => array(
30                            'count' => $this->iSearchNameCount,
31                            'terms' => $this->iTermCount
32                           )
33                );
34     }
35 }