Author: Niklas Närhinen (niklas@narhinen.net)
Inheritance: extends AbstractHttpProvider, implements Geocoder\Provider\LocaleAwareProvider, use trait Geocoder\Provider\LocaleTrait
 /**
  * @param HttpAdapterInterface $adapter An HTTP adapter.
  * @param string               $locale  A locale (optional).
  */
 public function __construct(HttpAdapterInterface $adapter, $kbid = null, $secretKey = null, $endpoint = null)
 {
     parent::__construct($adapter, static::ROOT_URL, 'it_IT');
     if (is_null($kbid)) {
         $kbid = 'demo';
     }
     if (is_null($secretKey)) {
         $secretKey = 'demo';
     }
     if (is_null($endpoint)) {
         $endpoint = "https://hub1.linkeddata.center/{$kbid}";
     }
     HttpClient::useIdentity($kbid, $secretKey);
     $this->sparql = new SparqlClient("{$endpoint}/sparql");
     $this->factory = new AddressFactory();
 }
Exemple #2
0
 /**
  * @param HttpAdapterInterface $adapter An HTTP adapter.
  * @param string               $locale  A locale (optional).
  */
 public function __construct(HttpAdapterInterface $adapter, $locale = null)
 {
     parent::__construct($adapter, static::ROOT_URL, $locale);
 }
Exemple #3
0
 /**
  * @param HttpClient $client An HTTP adapter.
  * @param string     $locale A locale (optional).
  */
 public function __construct(HttpClient $client, $locale = null)
 {
     parent::__construct($client, static::ROOT_URL, $locale);
 }