|
4 | 4 | * @copyright Copyright (c) 2014 Zend Technologies USA Inc. (http://www.zend.com) |
5 | 5 | */ |
6 | 6 |
|
7 | | -return array( |
8 | | - 'service_manager' => array( |
9 | | - 'aliases' => array( |
10 | | - 'ZF\ApiProblem\ApiProblemListener' => 'ZF\ApiProblem\Listener\ApiProblemListener', |
11 | | - 'ZF\ApiProblem\RenderErrorListener' => 'ZF\ApiProblem\Listener\RenderErrorListener', |
12 | | - 'ZF\ApiProblem\ApiProblemRenderer' => 'ZF\ApiProblem\View\ApiProblemRenderer', |
13 | | - 'ZF\ApiProblem\ApiProblemStrategy' => 'ZF\ApiProblem\View\ApiProblemStrategy', |
14 | | - ), |
15 | | - 'factories' => array( |
16 | | - 'ZF\ApiProblem\Listener\ApiProblemListener' => 'ZF\ApiProblem\Factory\ApiProblemListenerFactory', |
17 | | - 'ZF\ApiProblem\Listener\RenderErrorListener' => 'ZF\ApiProblem\Factory\RenderErrorListenerFactory', |
18 | | - 'ZF\ApiProblem\Listener\SendApiProblemResponseListener' => 'ZF\ApiProblem\Factory\SendApiProblemResponseListenerFactory', |
19 | | - 'ZF\ApiProblem\View\ApiProblemRenderer' => 'ZF\ApiProblem\Factory\ApiProblemRendererFactory', |
20 | | - 'ZF\ApiProblem\View\ApiProblemStrategy' => 'ZF\ApiProblem\Factory\ApiProblemStrategyFactory', |
21 | | - ) |
22 | | - ), |
| 7 | +use ZF\ApiProblem\Factory\ApiProblemListenerFactory; |
| 8 | +use ZF\ApiProblem\Factory\ApiProblemRendererFactory; |
| 9 | +use ZF\ApiProblem\Factory\ApiProblemStrategyFactory; |
| 10 | +use ZF\ApiProblem\Factory\RenderErrorListenerFactory; |
| 11 | +use ZF\ApiProblem\Factory\SendApiProblemResponseListenerFactory; |
| 12 | +use ZF\ApiProblem\Listener\ApiProblemListener; |
| 13 | +use ZF\ApiProblem\Listener\RenderErrorListener; |
| 14 | +use ZF\ApiProblem\Listener\SendApiProblemResponseListener; |
| 15 | +use ZF\ApiProblem\View\ApiProblemRenderer; |
| 16 | +use ZF\ApiProblem\View\ApiProblemStrategy; |
23 | 17 |
|
24 | | - 'view_manager' => array( |
| 18 | +return [ |
| 19 | + 'service_manager' => [ |
| 20 | + 'aliases' => [ |
| 21 | + 'ZF\ApiProblem\ApiProblemListener' => ApiProblemListener::class, |
| 22 | + 'ZF\ApiProblem\RenderErrorListener' => RenderErrorListener::class, |
| 23 | + 'ZF\ApiProblem\ApiProblemRenderer' => ApiProblemRenderer::class, |
| 24 | + 'ZF\ApiProblem\ApiProblemStrategy' => ApiProblemStrategy::class, |
| 25 | + ], |
| 26 | + 'factories' => [ |
| 27 | + ApiProblemListener::class => ApiProblemListenerFactory::class, |
| 28 | + RenderErrorListener::class => RenderErrorListenerFactory::class, |
| 29 | + SendApiProblemResponseListener::class => SendApiProblemResponseListenerFactory::class, |
| 30 | + ApiProblemRenderer::class => ApiProblemRendererFactory::class, |
| 31 | + ApiProblemStrategy::class => ApiProblemStrategyFactory::class, |
| 32 | + ], |
| 33 | + ], |
| 34 | + |
| 35 | + 'view_manager' => [ |
25 | 36 | // Enable this in your application configuration in order to get full |
26 | 37 | // exception stack traces in your API-Problem responses. |
27 | | - 'display_exceptions' => false, |
28 | | - ), |
| 38 | + 'display_exceptions' => FALSE, |
| 39 | + ], |
29 | 40 |
|
30 | | - 'zf-api-problem' => array( |
| 41 | + 'zf-api-problem' => [ |
31 | 42 | // Accept types that should allow ApiProblem responses |
32 | 43 | // 'accept_filters' => $stringOrArray, |
33 | 44 |
|
34 | 45 | // Array of controller service names that should enable the ApiProblem render.error listener |
35 | 46 | //'render_error_controllers' => array(), |
36 | | - ) |
37 | | -); |
| 47 | + ], |
| 48 | +]; |
0 commit comments