| @@ 163-176 (lines=14) @@ | ||
| 160 | return $apiClient; | |
| 161 | } | |
| 162 | ||
| 163 | private function generateSoapFault($code) | |
| 164 |     { | |
| 165 |         $message = "an error message {$code}"; | |
| 166 | $error = new \stdClass(); | |
| 167 | $error->Code = $code; | |
| 168 | $error->Message = $message; | |
| 169 |         $exception = new \SoapFault('Server', ''); | |
| 170 | $exception->detail = new \stdClass(); | |
| 171 | $exception->detail->AdApiFaultDetail = new \stdClass(); | |
| 172 | $exception->detail->AdApiFaultDetail->Errors = new \stdClass(); | |
| 173 | $exception->detail->AdApiFaultDetail->Errors->AdApiError = [$error]; | |
| 174 | ||
| 175 | return $exception; | |
| 176 | } | |
| 177 | } | |
| 178 | ||
| @@ 285-298 (lines=14) @@ | ||
| 282 | * @param $code | |
| 283 | * @return SoapFault | |
| 284 | */ | |
| 285 | private function generateSoapFault($code) | |
| 286 |     { | |
| 287 |         $message = "an error message {$code}"; | |
| 288 | $error = new stdClass(); | |
| 289 | $error->Code = $code; | |
| 290 | $error->Message = $message; | |
| 291 |         $exception = new SoapFault('Server', ''); | |
| 292 | $exception->detail = new stdClass(); | |
| 293 | $exception->detail->AdApiFaultDetail = new stdClass(); | |
| 294 | $exception->detail->AdApiFaultDetail->Errors = new stdClass(); | |
| 295 | $exception->detail->AdApiFaultDetail->Errors->AdApiError = [$error]; | |
| 296 | ||
| 297 | return $exception; | |
| 298 | } | |
| 299 | } | |
| 300 | ||