| 1 | <?php |
||
| 8 | class DefaultResponseFactory implements ResponseFactory |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $secret; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string $secret |
||
| 18 | */ |
||
| 19 | public function __construct($secret) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param array $data |
||
| 26 | * @return Response |
||
| 27 | */ |
||
| 28 | public function createSuccessResponse($data) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param Exception|Throwable $exception |
||
| 35 | * @return Response |
||
| 36 | */ |
||
| 37 | public function createErrorResponse($exception) |
||
| 41 | |||
| 42 | } |
||
| 43 |