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