1 | <?php |
||
27 | abstract class AbstractApiExceptionTransformer implements ApiExceptionTransformerInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $supportedApiExceptions = [ |
||
33 | AccessForbiddenException::class, |
||
34 | InvalidParameterException::class, |
||
35 | InvalidRequestException::class, |
||
36 | MethodNotFoundException::class, |
||
37 | NotAllowedException::class, |
||
38 | NotAuthorizedException::class, |
||
39 | ParameterRequiredException::class, |
||
40 | ResourceNotFoundException::class, |
||
41 | ServerErrorException::class, |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * @param \Exception $exception |
||
46 | * @param int $errorStatusCode |
||
47 | * @param string $errorStatusName |
||
48 | * |
||
49 | * @return ApiException |
||
50 | */ |
||
51 | 19 | protected function transformByStatusCodeAndName(\Exception $exception, $errorStatusCode, $errorStatusName) |
|
64 | } |
||
65 |