1 | <?php |
||
13 | class WsdlManager |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var WebServiceFactoryInterface |
||
18 | */ |
||
19 | protected $webServiceFactory; |
||
20 | |||
21 | /** |
||
22 | * @var Config |
||
23 | */ |
||
24 | protected $config; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $webServiceListeners = []; |
||
30 | |||
31 | /** |
||
32 | * Pole aktivních webových služeb |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $webServices = []; |
||
37 | |||
38 | |||
39 | /** |
||
40 | * @param WebServiceFactoryInterface $webServiceFactory továrna pro vytváření objektů webových služeb |
||
41 | * @param Config $config |
||
42 | */ |
||
43 | 4 | public function __construct(WebServiceFactoryInterface $webServiceFactory, Config $config) |
|
48 | |||
49 | 2 | public function getConfig(): Config |
|
50 | { |
||
51 | 2 | return $this->config; |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Získá objekt webové služby |
||
56 | * |
||
57 | * @param string $name celé jméno webové služby |
||
58 | * @param string|null $loginId skautIS login token |
||
59 | */ |
||
60 | 3 | public function getWebService(string $name, ?string $loginId = null): WebServiceInterface |
|
72 | |||
73 | /** |
||
74 | * Vytváří objekt webové služby |
||
75 | * |
||
76 | * @param string $name jméno webové služby |
||
77 | * @param array $options volby pro SoapClient |
||
78 | */ |
||
79 | 2 | public function createWebService(string $name, array $options = []): WebServiceInterface |
|
92 | |||
93 | /** |
||
94 | * Vrací URL webové služby podle jejího jména |
||
95 | */ |
||
96 | 2 | protected function getWebServiceUrl(string $name): string |
|
104 | |||
105 | public function isMaintenance(): bool |
||
110 | |||
111 | /** |
||
112 | * Přidá listener na spravovaných vytvářených webových služeb. |
||
113 | */ |
||
114 | public function addWebServiceListener(string $eventName, callable $callback): void |
||
121 | } |
||
122 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.