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