-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathOnRequestReceivedEvent.php
46 lines (40 loc) · 1.03 KB
/
OnRequestReceivedEvent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Yoanm\JsonRpcServer\Domain\Event\Acknowledge;
use Yoanm\JsonRpcServer\Domain\Event\JsonRpcServerEvent;
use Yoanm\JsonRpcServer\Domain\Model\JsonRpcCall;
/**
* Class OnRequestReceivedEvent
*
* Dispatched when a request has been passed to the endpoint and successfully deserialized
*/
class OnRequestReceivedEvent implements JsonRpcServerEvent
{
const EVENT_NAME = 'json_rpc_server_skd.on_request_received';
/** @var string */
private $request;
/** @var JsonRpcCall */
private $jsonRpcCall;
/**
* @param string $request
* @param JsonRpcCall $jsonRpcCall
*/
public function __construct(string $request, JsonRpcCall $jsonRpcCall)
{
$this->request = $request;
$this->jsonRpcCall = $jsonRpcCall;
}
/**
* @return string
*/
public function getRequest() : string
{
return $this->request;
}
/**
* @return JsonRpcCall
*/
public function getJsonRpcCall() : JsonRpcCall
{
return $this->jsonRpcCall;
}
}