1 | <?php |
||
12 | trait SoapManager |
||
13 | { |
||
14 | use ArrayManager; |
||
15 | |||
16 | /** |
||
17 | * URL of WSDL service to consume. |
||
18 | * |
||
19 | * @var string|null $wsdl |
||
20 | */ |
||
21 | private $wsdl; |
||
22 | /** |
||
23 | * Set of options for SOAP request. |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | private $options = []; |
||
28 | /** |
||
29 | * Response of SOAP method. |
||
30 | * |
||
31 | * @var mixed |
||
32 | */ |
||
33 | private $response = []; |
||
34 | /** |
||
35 | * Last SOAP response. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $rawResponse = ''; |
||
40 | /** |
||
41 | * The URIs of the namespaces. |
||
42 | * |
||
43 | * @var string[] |
||
44 | */ |
||
45 | private $namespaces = []; |
||
46 | /** |
||
47 | * Latest exception thrown out during SOAP call. |
||
48 | * |
||
49 | * @var null|\SoapFault |
||
50 | */ |
||
51 | private $exception; |
||
52 | |||
53 | /** |
||
54 | * Set of headers for SOAP request. |
||
55 | * |
||
56 | * @var array |
||
57 | */ |
||
58 | private $headers = []; |
||
59 | |||
60 | /** |
||
61 | * Make SOAP call to a function with params. |
||
62 | * |
||
63 | * @link http://php.net/manual/en/soapclient.getlastrequest.php#example-5896 |
||
64 | * |
||
65 | * @param string $function |
||
66 | * SOAP function name to execute. Use MethodNameIsIgnored if function name is in the XML body. |
||
67 | * @param array $arguments |
||
68 | * Arguments array to pass to soap call function. |
||
69 | */ |
||
70 | public function sendRequest($function, array $arguments) |
||
103 | |||
104 | /** |
||
105 | * Extracts first value matching provided XPATH expression. |
||
106 | * |
||
107 | * @param string $query |
||
108 | * XPATH expression used to extract value from $this->rawResponse |
||
109 | * |
||
110 | * @return \DOMNode|bool |
||
111 | 4 | */ |
|
112 | protected function extractResponseValueMatchingXPATH($query) |
||
128 | |||
129 | /** |
||
130 | * Helper to extract a property value from the response. |
||
131 | * |
||
132 | * @param string $property |
||
133 | * |
||
134 | * @return mixed |
||
135 | */ |
||
136 | protected function extractResponseProperty($property) |
||
140 | |||
141 | /** |
||
142 | * @return null|\SoapFault |
||
143 | */ |
||
144 | protected function getException() |
||
153 | |||
154 | /** |
||
155 | * @param string $wsdl |
||
156 | */ |
||
157 | protected function setWSDL($wsdl) |
||
171 | |||
172 | /** |
||
173 | * @param array $options |
||
174 | */ |
||
175 | protected function setOptions(array $options = null) |
||
185 | /** |
||
186 | * @param array $headers |
||
187 | */ |
||
188 | protected function setHeaders(array $headers = null) |
||
196 | |||
197 | /** |
||
198 | * @param string $option |
||
199 | * @param mixed $value |
||
200 | */ |
||
201 | protected function setOption($option, $value) |
||
205 | |||
206 | /** |
||
207 | * @param array $namespaces |
||
208 | */ |
||
209 | protected function setNamespaces(array $namespaces = null) |
||
219 | |||
220 | /** |
||
221 | * @param string $prefix |
||
222 | * @param string $uri |
||
223 | */ |
||
224 | protected function setNamespace($prefix, $uri) |
||
228 | |||
229 | /** |
||
230 | * @return mixed |
||
231 | */ |
||
232 | public function getResponse() |
||
236 | |||
237 | /** |
||
238 | * @return string |
||
239 | */ |
||
240 | public function getRawResponse() |
||
244 | } |
||
245 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..