equal
deleted
inserted
replaced
|
1 <?php |
|
2 namespace CorpusParole\Providers; |
|
3 |
|
4 use Illuminate\Support\ServiceProvider; |
|
5 use CorpusParole\Libraries\Sparql\SparqlClient; |
|
6 |
|
7 /** |
|
8 * Service provider charged to bind repository interfaces to implementations |
|
9 */ |
|
10 class SparqlClientServiceProvider extends ServiceProvider { |
|
11 |
|
12 public function register() { |
|
13 $this->app->bind( |
|
14 'CorpusParole\Libraries\Sparql\SparqlClient', |
|
15 function($app) { |
|
16 $httpClient = $app->make('GuzzleHttp\Client', [[ 'base_uri' => config('corpusparole.sesame_query_url'), 'http_errors' => false]]); |
|
17 $sparqlClient = $app->make('EasyRdf\Sparql\Client', [config('corpusparole.sesame_query_url'), config('corpusparole.sesame_update_url')]); |
|
18 return new SparqlClient($httpClient, $sparqlClient); |
|
19 } |
|
20 ); |
|
21 } |
|
22 } |