server/src/app/Services/GeonamesResolverInterface.php
changeset 304 20071981ba2a
equal deleted inserted replaced
303:2fef8007c2b2 304:20071981ba2a
       
     1 <?php
       
     2 namespace CorpusParole\Services;
       
     3 
       
     4 interface GeonamesResolverInterface {
       
     5 
       
     6     /**
       
     7      * Get label from Geonames id
       
     8      * @param string $id The id to resolve. Can be an url starting with http(s)://(wwww|sws).geonames.org
       
     9      * @return a string with the label
       
    10      */
       
    11     public function getLabel($id);
       
    12 
       
    13     /**
       
    14      * Get a list of labels from an array of geonames ids.
       
    15      * @param array $ids The array of ids to resolve.
       
    16      *                   Each id can be an url starting with http(s)://(wwww|sws).geonames.org
       
    17      */
       
    18     public function getLabels(array $ids);
       
    19 
       
    20 }