Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
RestApiServiceProvider
n/a
0 / 0
n/a
0 / 0
2
n/a
0 / 0
 register
n/a
0 / 0
n/a
0 / 0
2
1<?php
2namespace Apie\RestApi;
3
4use Apie\ServiceProviderGenerator\UseGeneratedMethods;
5use Illuminate\Support\ServiceProvider;
6
7/**
8 * This file is generated with apie/service-provider-generator from file: rest_api.yaml
9 * @codeCoverageIgnore
10 */
11class RestApiServiceProvider extends ServiceProvider
12{
13    use UseGeneratedMethods;
14
15    public function register()
16    {
17        $this->app->singleton(
18            \Apie\RestApi\RouteDefinitions\RestApiRouteDefinitionProvider::class,
19            function ($app) {
20                return new \Apie\RestApi\RouteDefinitions\RestApiRouteDefinitionProvider(
21                    $app->make(\Apie\Common\ActionDefinitionProvider::class),
22                    $app->make(\Psr\Log\LoggerInterface::class)
23                );
24            }
25        );
26        \Apie\ServiceProviderGenerator\TagMap::register(
27            $this->app,
28            \Apie\RestApi\RouteDefinitions\RestApiRouteDefinitionProvider::class,
29            array(
30              0 =>
31              array(
32                'name' => 'apie.common.route_definition',
33              ),
34            )
35        );
36        $this->app->tag([\Apie\RestApi\RouteDefinitions\RestApiRouteDefinitionProvider::class], 'apie.common.route_definition');
37        $this->app->singleton(
38            \Apie\RestApi\OpenApi\OpenApiGenerator::class,
39            function ($app) {
40                return new \Apie\RestApi\OpenApi\OpenApiGenerator(
41                    $app->make(\Apie\Core\ContextBuilders\ContextBuilderFactory::class),
42                    $app->make(\Apie\SchemaGenerator\ComponentsBuilderFactory::class),
43                    $app->make('apie.route_definitions.provider'),
44                    $app->make(\Apie\Serializer\Serializer::class),
45                    $app->make(\Psr\EventDispatcher\EventDispatcherInterface::class),
46                    $this->parseArgument('%apie.rest_api.base_url%'),
47                    $app->bound(\cebe\openapi\spec\OpenApi::class) ? $app->make(\cebe\openapi\spec\OpenApi::class) : null
48                );
49            }
50        );
51        $this->app->singleton(
52            \Apie\RestApi\Controllers\OpenApiDocumentationController::class,
53            function ($app) {
54                return new \Apie\RestApi\Controllers\OpenApiDocumentationController(
55                    $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class),
56                    $app->make(\Apie\RestApi\OpenApi\OpenApiGenerator::class)
57                );
58            }
59        );
60        \Apie\ServiceProviderGenerator\TagMap::register(
61            $this->app,
62            \Apie\RestApi\Controllers\OpenApiDocumentationController::class,
63            array(
64              0 => 'controller.service_arguments',
65            )
66        );
67        $this->app->tag([\Apie\RestApi\Controllers\OpenApiDocumentationController::class], 'controller.service_arguments');
68        $this->app->singleton(
69            \Apie\RestApi\Controllers\RestApiController::class,
70            function ($app) {
71                return new \Apie\RestApi\Controllers\RestApiController(
72                    $app->make(\Apie\Core\ContextBuilders\ContextBuilderFactory::class),
73                    $app->make(\Apie\Common\ApieFacade::class),
74                    $app->make(\Apie\Serializer\EncoderHashmap::class),
75                    $app->make(\Apie\Common\Events\ResponseDispatcher::class)
76                );
77            }
78        );
79        \Apie\ServiceProviderGenerator\TagMap::register(
80            $this->app,
81            \Apie\RestApi\Controllers\RestApiController::class,
82            array(
83              0 => 'controller.service_arguments',
84            )
85        );
86        $this->app->tag([\Apie\RestApi\Controllers\RestApiController::class], 'controller.service_arguments');
87        $this->app->singleton(
88            \Apie\RestApi\Controllers\SwaggerUIController::class,
89            function ($app) {
90                return new \Apie\RestApi\Controllers\SwaggerUIController(
91                    $this->parseArgument('%apie.rest_api.base_url%'),
92                    $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class)
93                );
94            }
95        );
96        \Apie\ServiceProviderGenerator\TagMap::register(
97            $this->app,
98            \Apie\RestApi\Controllers\SwaggerUIController::class,
99            array(
100              0 => 'controller.service_arguments',
101            )
102        );
103        $this->app->tag([\Apie\RestApi\Controllers\SwaggerUIController::class], 'controller.service_arguments');
104        $this->app->singleton(
105            \Apie\RestApi\EventListeners\OpenApiOperationAddedEventSubscriber::class,
106            function ($app) {
107                return new \Apie\RestApi\EventListeners\OpenApiOperationAddedEventSubscriber(
108                    $app->make(\Apie\Core\Datalayers\ApieDatalayer::class)
109                );
110            }
111        );
112        \Apie\ServiceProviderGenerator\TagMap::register(
113            $this->app,
114            \Apie\RestApi\EventListeners\OpenApiOperationAddedEventSubscriber::class,
115            array(
116              0 => 'kernel.event_subscriber',
117            )
118        );
119        $this->app->tag([\Apie\RestApi\EventListeners\OpenApiOperationAddedEventSubscriber::class], 'kernel.event_subscriber');
120        
121    }
122}