|
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
|
5 |
|
public function __construct( |
|
47
|
|
|
string $fname, |
|
48
|
|
|
array &$args, |
|
49
|
|
|
array &$options, |
|
50
|
|
|
array &$inputHeaders, |
|
51
|
|
|
array $trace |
|
52
|
|
|
) { |
|
53
|
5 |
|
$this->fname = $fname; |
|
54
|
5 |
|
$this->args = &$args; |
|
55
|
5 |
|
$this->options = &$options; |
|
56
|
5 |
|
$this->inputHeaders = &$inputHeaders; |
|
57
|
5 |
|
$this->trace = $trace; |
|
58
|
5 |
|
} |
|
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, [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
|
|
|
|
|
86
|
1 |
|
public function getFname(): string |
|
87
|
|
|
{ |
|
88
|
1 |
|
return $this->fname; |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* @return array<int, mixed> |
|
|
|
|
|
|
93
|
|
|
*/ |
|
94
|
2 |
|
public function &getArgs(): array |
|
95
|
|
|
{ |
|
96
|
2 |
|
return $this->args; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @return array<string, mixed> |
|
|
|
|
|
|
101
|
|
|
*/ |
|
102
|
2 |
|
public function &getOptions(): array |
|
103
|
|
|
{ |
|
104
|
2 |
|
return $this->options; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @return array<int, string> |
|
|
|
|
|
|
109
|
|
|
*/ |
|
110
|
2 |
|
public function &getInputHeaders(): array |
|
111
|
|
|
{ |
|
112
|
2 |
|
return $this->inputHeaders; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @return array<int, array<string, mixed>> |
|
|
|
|
|
|
117
|
|
|
*/ |
|
118
|
|
|
public function getTrace(): array |
|
119
|
|
|
{ |
|
120
|
|
|
return $this->trace; |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
} |
|
124
|
|
|
|
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.