Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| GraphqlServiceProvider | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||
| register | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| 1 | <?php |
| 2 | namespace Apie\Graphql; |
| 3 | |
| 4 | use Apie\ServiceProviderGenerator\UseGeneratedMethods; |
| 5 | use Illuminate\Support\ServiceProvider; |
| 6 | |
| 7 | /** |
| 8 | * This file is generated with apie/service-provider-generator from file: graphql.yaml |
| 9 | * @codeCoverageIgnore |
| 10 | */ |
| 11 | class GraphqlServiceProvider extends ServiceProvider |
| 12 | { |
| 13 | use UseGeneratedMethods; |
| 14 | |
| 15 | public function register() |
| 16 | { |
| 17 | $this->app->singleton( |
| 18 | \Apie\Graphql\RouteDefinitions\GraphqlRouteDefinitionProvider::class, |
| 19 | function ($app) { |
| 20 | return new \Apie\Graphql\RouteDefinitions\GraphqlRouteDefinitionProvider( |
| 21 | $app->make(\Apie\Common\ActionDefinitionProvider::class) |
| 22 | ); |
| 23 | } |
| 24 | ); |
| 25 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 26 | $this->app, |
| 27 | \Apie\Graphql\RouteDefinitions\GraphqlRouteDefinitionProvider::class, |
| 28 | array( |
| 29 | 0 => |
| 30 | array( |
| 31 | 'name' => 'apie.common.route_definition', |
| 32 | ), |
| 33 | ) |
| 34 | ); |
| 35 | $this->app->tag([\Apie\Graphql\RouteDefinitions\GraphqlRouteDefinitionProvider::class], 'apie.common.route_definition'); |
| 36 | $this->app->singleton( |
| 37 | \Apie\Graphql\Factories\GraphqlSchemaFactory::class, |
| 38 | function ($app) { |
| 39 | return new \Apie\Graphql\Factories\GraphqlSchemaFactory( |
| 40 | $app->make(\Apie\Common\ActionDefinitionProvider::class) |
| 41 | ); |
| 42 | } |
| 43 | ); |
| 44 | $this->app->singleton( |
| 45 | \Apie\Graphql\Controllers\DownloadFileController::class, |
| 46 | function ($app) { |
| 47 | return new \Apie\Graphql\Controllers\DownloadFileController( |
| 48 | $app->make(\Apie\Core\ContextBuilders\ContextBuilderFactory::class), |
| 49 | $app->make('apie'), |
| 50 | $app->make(\Apie\Serializer\EncoderHashmap::class), |
| 51 | $app->make(\Apie\Common\Events\ResponseDispatcher::class) |
| 52 | ); |
| 53 | } |
| 54 | ); |
| 55 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 56 | $this->app, |
| 57 | \Apie\Graphql\Controllers\DownloadFileController::class, |
| 58 | array( |
| 59 | 0 => 'controller.service_arguments', |
| 60 | ) |
| 61 | ); |
| 62 | $this->app->tag([\Apie\Graphql\Controllers\DownloadFileController::class], 'controller.service_arguments'); |
| 63 | $this->app->singleton( |
| 64 | \Apie\Graphql\Controllers\GraphqlController::class, |
| 65 | function ($app) { |
| 66 | return new \Apie\Graphql\Controllers\GraphqlController( |
| 67 | $app->make(\Apie\Graphql\Factories\GraphqlSchemaFactory::class), |
| 68 | $app->make(\Apie\Core\ContextBuilders\ContextBuilderFactory::class), |
| 69 | $app->make(\Apie\Common\Events\ResponseDispatcher::class) |
| 70 | ); |
| 71 | } |
| 72 | ); |
| 73 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 74 | $this->app, |
| 75 | \Apie\Graphql\Controllers\GraphqlController::class, |
| 76 | array( |
| 77 | 0 => 'controller.service_arguments', |
| 78 | ) |
| 79 | ); |
| 80 | $this->app->tag([\Apie\Graphql\Controllers\GraphqlController::class], 'controller.service_arguments'); |
| 81 | $this->app->singleton( |
| 82 | \Apie\Graphql\Controllers\GraphqlPlaygroundController::class, |
| 83 | function ($app) { |
| 84 | return new \Apie\Graphql\Controllers\GraphqlPlaygroundController( |
| 85 | $this->parseArgument('%apie.graphql.base_url%', \Apie\Graphql\Controllers\GraphqlPlaygroundController::class, 0), |
| 86 | $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class) |
| 87 | ); |
| 88 | } |
| 89 | ); |
| 90 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 91 | $this->app, |
| 92 | \Apie\Graphql\Controllers\GraphqlPlaygroundController::class, |
| 93 | array( |
| 94 | 0 => 'controller.service_arguments', |
| 95 | ) |
| 96 | ); |
| 97 | $this->app->tag([\Apie\Graphql\Controllers\GraphqlPlaygroundController::class], 'controller.service_arguments'); |
| 98 | |
| 99 | } |
| 100 | } |