server/src/app/Providers/LexvoServiceProvider.php
author ymh <ymh.work@gmail.com>
Sat, 10 Jun 2017 17:57:34 +0200
changeset 533 a557802f2b12
parent 531 48f5380c26d0
child 537 d2e6ee099125
permissions -rw-r--r--
Make guzzle client use the proxy configuration when injected by the ioc

<?php

namespace CorpusParole\Providers;

use Config;

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 = $app->make('CorpusParole\Libraries\Sparql\GuzzleSparqlClient', [$app['Guzzle'], config('corpusparole.lexvo_rdf4j_query_url'), null]);
            return $app->make('CorpusParole\Services\LexvoResolver', [$sparqlClient,]);
        });
    }
}