1 | <?php |
||
18 | class WebService implements WebServiceInterface |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * základní údaje volané při každém požadavku |
||
23 | * ID_Application, ID_Login |
||
24 | * |
||
25 | * @var array<string, mixed> |
||
26 | */ |
||
27 | protected $init; |
||
28 | |||
29 | /** |
||
30 | * @var SoapClient |
||
31 | */ |
||
32 | protected $soapClient; |
||
33 | |||
34 | /** |
||
35 | * @var EventDispatcherInterface|null |
||
36 | */ |
||
37 | private $eventDispatcher; |
||
38 | |||
39 | /** |
||
40 | * @param array<string, mixed> $soapOpts Nastaveni SOAP requestu |
||
41 | * @throws InvalidArgumentException pokud je odkaz na WSDL soubor prázdný |
||
42 | */ |
||
43 | 2 | public function __construct( |
|
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | 1 | public function call(string $functionName, array $arguments = []) |
|
60 | |||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | 1 | public function __call(string $functionName, array $arguments) |
|
69 | |||
70 | /** |
||
71 | * Metoda provadejici SOAP pozadavek na servery Skautisu |
||
72 | * |
||
73 | * @see http://php.net/manual/en/soapclient.soapcall.php |
||
74 | * |
||
75 | * @param string $functionName Nazev akce k provedeni na WebService |
||
76 | * @param array<int|string, mixed> $arguments ([0]=args [1]=cover) |
||
77 | * @param array<string, mixed> $options Nastaveni |
||
78 | * @param array<int, string> $inputHeaders Hlavicky pouzite pri odesilani |
||
79 | * @param array<int, string> $outputHeaders Hlavicky ktere prijdou s odpovedi |
||
80 | * @return mixed |
||
81 | */ |
||
82 | 1 | protected function soapCall( |
|
120 | |||
121 | /** |
||
122 | * Z defaultnich parametru a parametru callu vytvori argumenty pro SoapClient::__soapCall |
||
123 | * |
||
124 | * @param string $functionName Jmeno funkce volane pres SOAP |
||
125 | * @param array<int|string, mixed> $arguments Argumenty k mergnuti s defaultnimy |
||
126 | * |
||
127 | * @return array<int, mixed> Argumenty pro SoapClient::__soapCall |
||
128 | */ |
||
129 | 1 | protected function prepareArgs(string $functionName, array $arguments): array |
|
157 | |||
158 | /** |
||
159 | * Parsuje output ze SoapClient do jednotného formátu |
||
160 | * |
||
161 | * @param string $fname Jméno funkce volané přes SOAP |
||
162 | * @param mixed $ret Odpoveď ze SoapClient::__soapCall |
||
163 | * |
||
164 | * @return array<int|string, mixed> |
||
165 | */ |
||
166 | protected function parseOutput(string $fname, $ret): array |
||
185 | |||
186 | 1 | private function convertToSkautisException(Throwable $e): WsdlException |
|
198 | } |
||
199 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: