|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Bankiru\Api\Rpc; |
|
4
|
|
|
|
|
5
|
|
|
use Bankiru\Api\Rpc\Http\RequestInterface; |
|
6
|
|
|
use Symfony\Component\EventDispatcher\Event; |
|
7
|
|
|
use Symfony\Component\HttpKernel\HttpKernelInterface; |
|
8
|
|
|
|
|
9
|
|
|
class RpcEvent extends Event |
|
10
|
|
|
{ |
|
11
|
|
|
/** @var HttpKernelInterface */ |
|
12
|
|
|
private $kernel; |
|
13
|
|
|
/** @var RequestInterface */ |
|
14
|
|
|
private $request; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* RpcEvent constructor. |
|
18
|
|
|
* |
|
19
|
|
|
* @param HttpKernelInterface $kernel |
|
20
|
|
|
* @param RequestInterface $request |
|
21
|
|
|
*/ |
|
22
|
7 |
|
public function __construct(HttpKernelInterface $kernel, RequestInterface $request) |
|
23
|
|
|
{ |
|
24
|
7 |
|
$this->kernel = $kernel; |
|
25
|
7 |
|
$this->request = $request; |
|
26
|
7 |
|
} |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @return HttpKernelInterface |
|
30
|
|
|
*/ |
|
31
|
|
|
public function getKernel() |
|
32
|
|
|
{ |
|
33
|
|
|
return $this->kernel; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @return RequestInterface |
|
38
|
|
|
*/ |
|
39
|
7 |
|
public function getRequest() |
|
40
|
|
|
{ |
|
41
|
7 |
|
return $this->request; |
|
42
|
|
|
} |
|
43
|
|
|
} |
|
44
|
|
|
|