File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2198,6 +2198,10 @@ We can use class name as service ID (or alias it) when we are providing open-sou
2198
2198
This allows others to use autowiring features if needed, even if we don't use them.
2199
2199
We should only use this for public services - ones that are to be used outside of our bundle.
2200
2200
2201
+ Exception : for controllers we use classname as service ID.
2202
+ > **Why?** Because routing annotations work only when controller's service ID is it's classname
2203
+ > (otherwise it has no way to know it).
2204
+
2201
2205
# ### Autoconfiguration and autowiring
2202
2206
2203
2207
We don't use autowiring and autoconfiguration features of Dependency Injection component.
@@ -3120,7 +3124,7 @@ Keep in mind that there are different skeletons for WEB, REST API and processing
3120
3124
3121
3125
# ## REST controllers
3122
3126
3123
- For REST controllers, we use [`PayseraRestBundle `](https://github.com/paysera/lib-rest -bundle) and normalizers.
3127
+ For REST controllers, we use [`PayseraApiBundle `](https://github.com/paysera/lib-api -bundle) and normalizers.
3124
3128
3125
3129
Controller methods return entities or scalar variables.
3126
3130
@@ -3134,6 +3138,9 @@ We can use plain normalizer or plain item normalizer if needed.
3134
3138
3135
3139
We use result provider to give `Result` entities from REST controller.
3136
3140
3141
+ Response is automatically normalized using normalizer related to the classname of the returned object.
3142
+ We could override it with additional annotation, if needed.
3143
+
3137
3144
# ## Extending model
3138
3145
3139
3146
In server side we do not use subclasses and class-maps - we use services that give or process needed information.
You can’t perform that action at this time.
0 commit comments