Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
11 | class LumenServiceProvider extends HttpServiceProvider |
||
12 | { |
||
13 | /** |
||
14 | * Load configurations. |
||
15 | */ |
||
16 | protected function loadConfigs() |
||
17 | { |
||
18 | $this->app->configure('swoole_http'); |
||
19 | $this->app->configure('swoole_websocket'); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Register manager. |
||
24 | * |
||
25 | * @return void |
||
26 | */ |
||
27 | protected function registerManager() |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Boot websocket routes. |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | protected function bootWebsocketRoutes() |
||
42 | { |
||
43 | $this->app->router |
||
|
|||
44 | ->group(['namespace' => 'SwooleTW\Http\Controllers'], function ($router) { |
||
45 | require __DIR__ . '/../routes/lumen_routes.php'; |
||
46 | }); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Register access log middleware to container. |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | protected function pushAccessLogMiddleware() |
||
57 | } |
||
58 | } |
||
59 |