133
|
1 |
<?php |
|
2 |
|
|
3 |
namespace CorpusParole\Providers; |
|
4 |
|
|
5 |
use Config; |
|
6 |
|
|
7 |
use Illuminate\Support\ServiceProvider; |
|
8 |
|
|
9 |
class BnfServiceProvider extends ServiceProvider |
|
10 |
{ |
|
11 |
/** |
|
12 |
* Register the application services. |
|
13 |
* |
|
14 |
* @return void |
|
15 |
*/ |
|
16 |
public function register() |
|
17 |
{ |
|
18 |
$this->app->bind('CorpusParole\Services\BnfResolverInterface', function($app) { |
|
19 |
$sparqlClient = $app->make('EasyRdf\Sparql\Client', [config('corpusparole.bnf_query_url'), null]); |
|
20 |
return $app->make('CorpusParole\Services\BnfResolver', [$sparqlClient,]); |
|
21 |
}); |
|
22 |
} |
|
23 |
} |