1
|
|
|
<?php |
2
|
|
|
declare(strict_types = 1); |
3
|
|
|
|
4
|
|
|
namespace Skaut\Skautis\Wsdl\Event; |
5
|
|
|
|
6
|
|
|
use Serializable; |
7
|
|
|
|
8
|
|
|
class RequestPreEvent implements Serializable |
9
|
|
|
{ |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @var string Nazev funkce volane pomoci SOAP requestu |
13
|
|
|
*/ |
14
|
|
|
private $fname; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Parametry SOAP requestu na server |
18
|
|
|
* |
19
|
|
|
* @var array<int, mixed> |
20
|
|
|
*/ |
21
|
|
|
private $args; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var array<string, mixed> |
25
|
|
|
*/ |
26
|
|
|
private $options; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var array<int, string> |
30
|
|
|
*/ |
31
|
|
|
private $inputHeaders; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var array<int, array<string, mixed>> Zasobnik volanych funkci |
35
|
|
|
*/ |
36
|
|
|
private $trace; |
37
|
|
|
|
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @param string $fname Nazev volane funkce |
41
|
|
|
* @param array<int, mixed> $args Argumenty pozadavku |
42
|
|
|
* @param array<string, mixed> $options |
43
|
|
|
* @param array<int, string> $inputHeaders |
44
|
|
|
* @param array<int, array<string, mixed>> $trace Zasobnik volanych funkci |
45
|
|
|
*/ |
46
|
2 |
|
public function __construct( |
47
|
|
|
string $fname, |
48
|
|
|
array $args, |
49
|
|
|
array $options, |
50
|
|
|
array $inputHeaders, |
51
|
|
|
array $trace |
52
|
|
|
) { |
53
|
2 |
|
$this->fname = $fname; |
54
|
2 |
|
$this->args = $args; |
55
|
2 |
|
$this->options = $options; |
56
|
2 |
|
$this->inputHeaders = $inputHeaders; |
57
|
2 |
|
$this->trace = $trace; |
58
|
2 |
|
} |
59
|
|
|
|
60
|
1 |
|
public function serialize(): string |
61
|
|
|
{ |
62
|
|
|
$data = [ |
63
|
1 |
|
'fname' => $this->fname, |
64
|
1 |
|
'args' => $this->args, |
65
|
1 |
|
'options' => $this->options, |
66
|
1 |
|
'inputHeaders' => $this->inputHeaders, |
67
|
1 |
|
'trace' => $this->trace, |
68
|
|
|
]; |
69
|
1 |
|
return serialize($data); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @param string $data |
74
|
|
|
*/ |
75
|
1 |
|
public function unserialize($data): void |
76
|
|
|
{ |
77
|
1 |
|
$data = unserialize($data, ['allowed_classes' => [self::class]]); |
78
|
1 |
|
$this->fname = (string) $data['fname']; |
79
|
1 |
|
$this->args = (array) $data['args']; |
80
|
1 |
|
$this->options = (array) $data['options']; |
81
|
1 |
|
$this->inputHeaders = (array) $data['inputHeaders']; |
82
|
1 |
|
$this->trace = (array) $data['trace']; |
83
|
1 |
|
} |
84
|
|
|
|
85
|
1 |
|
public function getFname(): string |
86
|
|
|
{ |
87
|
1 |
|
return $this->fname; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return array<int, mixed> |
|
|
|
|
92
|
|
|
*/ |
93
|
1 |
|
public function getArgs(): array |
94
|
|
|
{ |
95
|
1 |
|
return $this->args; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return array<string, mixed> |
|
|
|
|
100
|
|
|
*/ |
101
|
1 |
|
public function getOptions(): array |
102
|
|
|
{ |
103
|
1 |
|
return $this->options; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return array<int, string> |
|
|
|
|
108
|
|
|
*/ |
109
|
1 |
|
public function getInputHeaders(): array |
110
|
|
|
{ |
111
|
1 |
|
return $this->inputHeaders; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return array<int, array<string, mixed>> |
|
|
|
|
116
|
|
|
*/ |
117
|
|
|
public function getTrace(): array |
118
|
|
|
{ |
119
|
|
|
return $this->trace; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
} |
123
|
|
|
|
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.