File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Aws \ApiGatewayManagementApi \ApiGatewayManagementApiClient ;
6
6
use Aws \ApiGatewayManagementApi \Exception \ApiGatewayManagementApiException ;
7
- use GuzzleHttp \Exception \ClientException ;
8
7
9
8
class ConnectionRepository
10
9
{
11
10
protected ApiGatewayManagementApiClient $ apiGatewayManagementApiClient ;
11
+ protected SubscriptionRepository $ subscriptionRepository ;
12
12
13
13
public function __construct (
14
- protected SubscriptionRepository $ subscriptionRepository ,
14
+ SubscriptionRepository $ subscriptionRepository ,
15
15
array $ config
16
16
) {
17
+ $ this ->subscriptionRepository = $ subscriptionRepository ;
18
+
17
19
$ this ->apiGatewayManagementApiClient = new ApiGatewayManagementApiClient (array_merge ($ config ['connection ' ], [
18
20
'version ' => '2018-11-29 ' ,
19
21
'endpoint ' => "https:// {$ config ['api ' ]['id ' ]}.execute-api. {$ config ['connection ' ]['region ' ]}.amazonaws.com/ {$ config ['api ' ]['stage ' ]}/ " ,
Original file line number Diff line number Diff line change 13
13
14
14
class Handler extends WebsocketHandler
15
15
{
16
+ protected SubscriptionRepository $ subscriptionRepository ;
17
+ protected ConnectionRepository $ connectionRepository ;
18
+
16
19
public function __construct (
17
- protected SubscriptionRepository $ subscriptionRepository ,
18
- protected ConnectionRepository $ connectionRepository
20
+ SubscriptionRepository $ subscriptionRepository ,
21
+ ConnectionRepository $ connectionRepository
19
22
) {
20
23
$ this ->subscriptionRepository = $ subscriptionRepository ;
21
24
$ this ->connectionRepository = $ connectionRepository ;
You can’t perform that action at this time.
0 commit comments