| @@ 130-143 (lines=14) @@ | ||
| 127 | return $apiClient; |
|
| 128 | } |
|
| 129 | ||
| 130 | private function generateSoapFault($code) |
|
| 131 | { |
|
| 132 | $message = "an error message {$code}"; |
|
| 133 | $error = new \stdClass(); |
|
| 134 | $error->Code = $code; |
|
| 135 | $error->Message = $message; |
|
| 136 | $exception = new \SoapFault('Server', ''); |
|
| 137 | $exception->detail = new \stdClass(); |
|
| 138 | $exception->detail->AdApiFaultDetail = new \stdClass(); |
|
| 139 | $exception->detail->AdApiFaultDetail->Errors = new \stdClass(); |
|
| 140 | $exception->detail->AdApiFaultDetail->Errors->AdApiError = [$error]; |
|
| 141 | ||
| 142 | return $exception; |
|
| 143 | } |
|
| 144 | } |
|
| 145 | ||
| @@ 291-304 (lines=14) @@ | ||
| 288 | * @param $code |
|
| 289 | * @return SoapFault |
|
| 290 | */ |
|
| 291 | private function generateSoapFault($code) |
|
| 292 | { |
|
| 293 | $message = "an error message {$code}"; |
|
| 294 | $error = new stdClass(); |
|
| 295 | $error->Code = $code; |
|
| 296 | $error->Message = $message; |
|
| 297 | $exception = new SoapFault('Server', ''); |
|
| 298 | $exception->detail = new stdClass(); |
|
| 299 | $exception->detail->AdApiFaultDetail = new stdClass(); |
|
| 300 | $exception->detail->AdApiFaultDetail->Errors = new stdClass(); |
|
| 301 | $exception->detail->AdApiFaultDetail->Errors->AdApiError = [$error]; |
|
| 302 | ||
| 303 | return $exception; |
|
| 304 | } |
|
| 305 | } |
|
| 306 | ||