]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/TokenList.php
tests for Nominatim::TokenList
[nominatim.git] / lib / TokenList.php
index 96b756f8b11c4b23c901ab45182f81e1f548fe25..a91c735ed6a2e97beb33677b5680074c08b2cdae 100644 (file)
@@ -32,6 +32,17 @@ class TokenList
     // List of list of tokens indexed by their word_token.
     private $aTokens = array();
 
+
+    /**
+     * Return total number of tokens.
+     *
+     * @return Integer
+     */
+    public function count()
+    {
+        return count($this->aTokens);
+    }
+
     /**
      * Check if there are tokens for the given token word.
      *