1 | <?php |
||
16 | class WebService implements WebServiceInterface |
||
17 | { |
||
18 | |||
19 | use EventDispatcherTrait; |
||
20 | |||
21 | public const EVENT_SUCCESS = 'success'; |
||
22 | public const EVENT_FAILURE = 'failure'; |
||
23 | |||
24 | /** |
||
25 | * základní údaje volané při každém požadavku |
||
26 | * ID_Application, ID_Login |
||
27 | * |
||
28 | * @var array<string, mixed> |
||
29 | */ |
||
30 | protected $init; |
||
31 | |||
32 | /** |
||
33 | * @var SoapClient |
||
34 | */ |
||
35 | protected $soapClient; |
||
36 | |||
37 | /** |
||
38 | * @param array<string, mixed> $soapOpts Nastaveni SOAP requestu |
||
39 | * @throws InvalidArgumentException pokud je odkaz na WSDL soubor prázdný |
||
40 | */ |
||
41 | 3 | public function __construct(SoapClient $soapClient, array $soapOpts) |
|
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 2 | public function call(string $functionName, array $arguments = []) |
|
54 | |||
55 | |||
56 | /** |
||
57 | * @inheritdoc |
||
58 | */ |
||
59 | 1 | public function __call(string $functionName, array $arguments) |
|
63 | |||
64 | /** |
||
65 | * Metoda provadejici SOAP pozadavek na servery Skautisu |
||
66 | * |
||
67 | * @see http://php.net/manual/en/soapclient.soapcall.php |
||
68 | * |
||
69 | * @param string $functionName Nazev akce k provedeni na WebService |
||
70 | * @param array<int|string, mixed> $arguments ([0]=args [1]=cover) |
||
71 | * @param array<string, mixed> $options Nastaveni |
||
72 | * @param array<int, string> $inputHeaders Hlavicky pouzite pri odesilani |
||
73 | * @param array<int, string> $outputHeaders Hlavicky ktere prijdou s odpovedi |
||
74 | * @return mixed |
||
75 | */ |
||
76 | 2 | protected function soapCall( |
|
107 | |||
108 | /** |
||
109 | * Z defaultnich parametru a parametru callu vytvori argumenty pro SoapClient::__soapCall |
||
110 | * |
||
111 | * @param string $functionName Jmeno funkce volane pres SOAP |
||
112 | * @param array<int|string, mixed> $arguments Argumenty k mergnuti s defaultnimy |
||
113 | * |
||
114 | * @return array<int, mixed> Argumenty pro SoapClient::__soapCall |
||
|
|||
115 | */ |
||
116 | 2 | protected function prepareArgs(string $functionName, array $arguments): array |
|
144 | |||
145 | /** |
||
146 | * Parsuje output ze SoapClient do jednotného formátu |
||
147 | * |
||
148 | * @param string $fname Jméno funkce volané přes SOAP |
||
149 | * @param mixed $ret Odpoveď ze SoapClient::__soapCall |
||
150 | * |
||
151 | * @return array<int|string, mixed> |
||
152 | */ |
||
153 | protected function parseOutput(string $fname, $ret): array |
||
172 | |||
173 | 2 | private function convertToSkautisException(SoapFault $e): WsdlException |
|
185 | } |
||
186 |
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.