/** * @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(); }
/** * @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); }
/** * @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); }