server/src/app/Providers/SparqlClientServiceProvider.php
changeset 405 f239c8c5bb94
parent 126 e87a340711a4
child 531 48f5380c26d0
equal deleted inserted replaced
404:0a5eef6ad2fe 405:f239c8c5bb94
    11 
    11 
    12     public function register() {
    12     public function register() {
    13         $this->app->bind(
    13         $this->app->bind(
    14             'CorpusParole\Libraries\Sparql\SparqlClient',
    14             'CorpusParole\Libraries\Sparql\SparqlClient',
    15             function($app) {
    15             function($app) {
    16                 $httpClient = $app->make('GuzzleHttp\Client', [[ 'base_uri' => config('corpusparole.sesame_query_url'), 'http_errors' => false]]);
    16                 $httpClient = $app->make('GuzzleHttp\Client', [[ 'base_uri' => config('corpusparole.rdf4j_query_url'), 'http_errors' => false]]);
    17                 $sparqlClient = $app->make('EasyRdf\Sparql\Client', [config('corpusparole.sesame_query_url'), config('corpusparole.sesame_update_url')]);
    17                 $sparqlClient = $app->make('EasyRdf\Sparql\Client', [config('corpusparole.rdf4j_query_url'), config('corpusparole.rdf4j_update_url')]);
    18                 return new SparqlClient($httpClient, $sparqlClient);
    18                 return new SparqlClient($httpClient, $sparqlClient);
    19             }
    19             }
    20         );
    20         );
    21     }
    21     }
    22 }
    22 }