|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Freshcells\SoapClientBundle\Event; |
|
4
|
|
|
|
|
5
|
|
|
use Symfony\Component\EventDispatcher\Event; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Class ResponseEvent |
|
9
|
|
|
*/ |
|
10
|
|
|
class ResponseEvent extends Event |
|
11
|
|
|
{ |
|
12
|
|
|
/** |
|
13
|
|
|
* @var string |
|
14
|
|
|
*/ |
|
15
|
|
|
private $id; |
|
16
|
|
|
/** |
|
17
|
|
|
* @var string |
|
18
|
|
|
*/ |
|
19
|
|
|
private $resource; |
|
20
|
|
|
/** |
|
21
|
|
|
* @var |
|
22
|
|
|
*/ |
|
23
|
|
|
private $requestContent; |
|
24
|
|
|
/** |
|
25
|
|
|
* @var |
|
26
|
|
|
*/ |
|
27
|
|
|
private $requestHeaders; |
|
28
|
|
|
/** |
|
29
|
|
|
* @var |
|
30
|
|
|
*/ |
|
31
|
|
|
private $responseContent; |
|
32
|
|
|
/** |
|
33
|
|
|
* @var |
|
34
|
|
|
*/ |
|
35
|
|
|
private $responseHeaders; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* ResponseEvent constructor. |
|
39
|
|
|
* @param string $id |
|
40
|
|
|
* @param string $resource |
|
41
|
|
|
* @param string $requestContent |
|
42
|
|
|
* @param string $requestHeaders |
|
43
|
|
|
* @param string $responseContent |
|
44
|
|
|
* @param string $responseHeaders |
|
45
|
|
|
*/ |
|
46
|
9 |
|
public function __construct( |
|
47
|
|
|
string $id, |
|
48
|
|
|
string $resource, |
|
49
|
|
|
string $requestContent, |
|
50
|
|
|
string $requestHeaders = null, |
|
51
|
|
|
string $responseContent = null, |
|
52
|
|
|
string $responseHeaders = null |
|
53
|
|
|
) { |
|
54
|
9 |
|
$this->id = $id; |
|
55
|
9 |
|
$this->resource = $resource; |
|
56
|
9 |
|
$this->requestContent = $requestContent; |
|
57
|
9 |
|
$this->requestHeaders = $requestHeaders; |
|
58
|
9 |
|
$this->responseContent = $responseContent; |
|
59
|
9 |
|
$this->responseHeaders = $responseHeaders; |
|
60
|
9 |
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @return string |
|
64
|
|
|
*/ |
|
65
|
9 |
|
public function getId(): string |
|
66
|
|
|
{ |
|
67
|
9 |
|
return $this->id; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @return string |
|
72
|
|
|
*/ |
|
73
|
|
|
public function getResource(): string |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->resource; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* @return string |
|
80
|
|
|
*/ |
|
81
|
9 |
|
public function getRequestContent(): string |
|
82
|
|
|
{ |
|
83
|
9 |
|
return $this->requestContent; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* @return string |
|
88
|
|
|
*/ |
|
89
|
9 |
|
public function getResponseContent(): ?string |
|
90
|
|
|
{ |
|
91
|
9 |
|
return $this->responseContent; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @return string |
|
96
|
|
|
*/ |
|
97
|
9 |
|
public function getRequestHeaders(): ?string |
|
98
|
|
|
{ |
|
99
|
9 |
|
return $this->requestHeaders; |
|
100
|
|
|
} |
|
101
|
|
|
|
|
102
|
|
|
/** |
|
103
|
|
|
* @return string |
|
104
|
|
|
*/ |
|
105
|
9 |
|
public function getResponseHeaders(): ?string |
|
106
|
|
|
{ |
|
107
|
9 |
|
return $this->responseHeaders; |
|
108
|
|
|
} |
|
109
|
|
|
} |
|
110
|
|
|
|