2021-02-26 16:02:07 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Visual Studio Code.
|
|
|
|
* User: kaiarn
|
|
|
|
* Date: 19.02.21
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2021-05-18 11:17:29 +00:00
|
|
|
use App\Tethys\Utils\DoiClient;
|
|
|
|
use App\Interfaces\DoiInterface;
|
2021-02-26 16:02:07 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class DoiServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
protected $defer = true;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
$this->app->singleton('App\Interfaces\DoiInterface', function ($app) {
|
2021-05-18 11:17:29 +00:00
|
|
|
return new DoiClient();
|
2021-02-26 16:02:07 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function provides()
|
|
|
|
{
|
2021-05-18 11:17:29 +00:00
|
|
|
return [DoiClient::class];
|
2021-02-26 16:02:07 +00:00
|
|
|
}
|
|
|
|
}
|