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