|
@@ -50,22 +50,22 @@ discard block |
|
|
block discarded – undo |
|
50
|
50
|
|
|
51
|
51
|
$container[FactoryInterface::class] = $factory; |
|
52
|
52
|
|
|
53
|
|
- $container[JsonSchemesInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
|
53
|
+ $container[JsonSchemesInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
54
|
54
|
$settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
|
55
|
55
|
$modelSchemes = $container->get(ModelSchemeInfoInterface::class); |
|
56
|
56
|
|
|
57
|
57
|
return $factory->createJsonSchemes($settings[FluteSettings::KEY_MODEL_TO_SCHEME_MAP], $modelSchemes); |
|
58
|
58
|
}; |
|
59
|
59
|
|
|
60
|
|
- $container[QueryParserInterface::class] = function (PsrContainerInterface $container) { |
|
|
60
|
+ $container[QueryParserInterface::class] = function(PsrContainerInterface $container) { |
|
61
|
61
|
return new QueryParser($container->get(PaginationStrategyInterface::class)); |
|
62
|
62
|
}; |
|
63
|
63
|
|
|
64
|
|
- $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) { |
|
|
64
|
+ $container[ParametersMapperInterface::class] = function(PsrContainerInterface $container) { |
|
65
|
65
|
return new ParametersMapper($container->get(JsonSchemesInterface::class)); |
|
66
|
66
|
}; |
|
67
|
67
|
|
|
68
|
|
- $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
|
68
|
+ $container[EncoderInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
69
|
69
|
/** @var JsonSchemesInterface $jsonSchemes */ |
|
70
|
70
|
$jsonSchemes = $container->get(JsonSchemesInterface::class); |
|
71
|
71
|
$settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
|
@@ -80,7 +80,7 @@ discard block |
|
|
block discarded – undo |
|
80
|
80
|
return $encoder; |
|
81
|
81
|
}; |
|
82
|
82
|
|
|
83
|
|
- $container[PaginationStrategyInterface::class] = function (PsrContainerInterface $container) { |
|
|
83
|
+ $container[PaginationStrategyInterface::class] = function(PsrContainerInterface $container) { |
|
84
|
84
|
$settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
|
85
|
85
|
|
|
86
|
86
|
return new PaginationStrategy( |
|
@@ -89,7 +89,7 @@ discard block |
|
|
block discarded – undo |
|
89
|
89
|
); |
|
90
|
90
|
}; |
|
91
|
91
|
|
|
92
|
|
- $container[JsonApiValidatorFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
|
92
|
+ $container[JsonApiValidatorFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
93
|
93
|
$factory = new JsonApiValidatorFactory($container); |
|
94
|
94
|
|
|
95
|
95
|
return $factory; |
|
@@ -117,7 +117,7 @@ discard block |
|
|
block discarded – undo |
|
117
|
117
|
*/ |
|
118
|
118
|
public static function configureExceptionHandler(LimoncelloContainerInterface $container) |
|
119
|
119
|
{ |
|
120
|
|
- $container[ThrowableHandlerInterface::class] = function (PsrContainerInterface $container) { |
|
|
120
|
+ $container[ThrowableHandlerInterface::class] = function(PsrContainerInterface $container) { |
|
121
|
121
|
/** @var CacheSettingsProviderInterface $provider */ |
|
122
|
122
|
$provider = $container->get(CacheSettingsProviderInterface::class); |
|
123
|
123
|
$appConfig = $provider->getApplicationConfiguration(); |