Skip to content

Commit 4117113

Browse files
committed
Laravel Service Provider: Use any existing PSR-17/18 bindings
1 parent 5e906c0 commit 4117113

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Laravel/ServiceProvider.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace Scriptotek\Alma\Laravel;
44

5+
use Psr\Http\Client\ClientInterface as HttpClientInterface;
6+
use Psr\Http\Message\RequestFactoryInterface;
7+
use Psr\Http\Message\UriFactoryInterface;
58
use Scriptotek\Alma\Client as AlmaClient;
69
use Scriptotek\Sru\Client as SruClient;
710

@@ -43,7 +46,11 @@ public function register()
4346
// Create Alma client
4447
$alma = new AlmaClient(
4548
$app['config']->get('alma.iz.key'),
46-
$app['config']->get('alma.region')
49+
$app['config']->get('alma.region'),
50+
Zones::INSTITUTION,
51+
isset($app[HttpClientInterface::class]) ? $app[HttpClientInterface::class] : null,
52+
isset($app[RequestFactoryInterface::class]) ? $app[RequestFactoryInterface::class] : null,
53+
isset($app[UriFactoryInterface::class]) ? $app[UriFactoryInterface::class] : null
4754
);
4855

4956
// Set network zone key, if any

0 commit comments

Comments
 (0)