server/src/app/Providers/LexvoServiceProvider.php
author ymh <ymh.work@gmail.com>
Tue, 11 Jul 2017 09:49:26 +0200
changeset 540 07239de796bb
parent 537 d2e6ee099125
permissions -rw-r--r--
When building the rpm, ignore folder with transient content

<?php

namespace CorpusParole\Providers;

use Config;
use CorpusParole\Libraries\Sparql\GuzzleSparqlClient;
use CorpusParole\Services\LexvoResolver;

use Illuminate\Support\ServiceProvider;

class LexvoServiceProvider extends ServiceProvider
{
    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->bind('CorpusParole\Services\LexvoResolverInterface', function($app) {
            $sparqlClient = new GuzzleSparqlClient($app['Guzzle'], config('corpusparole.lexvo_rdf4j_query_url'), null);
            return new LexvoResolver($sparqlClient);
        });
    }
}