mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 04:47:02 +00:00
split of the mvc and the new hero package is completed, now handlers with input and output binding feature is a different feature than the mvc, however the mvc controller's methods can use the hero dependency injection as before (v10+)
Former-commit-id: d67f5a5ed9033286bcc4c04f6be612823cba2a57
This commit is contained in:
@@ -78,8 +78,8 @@ Optional `EndRequest(ctx)` function to perform any finalization after any method
|
||||
|
||||
Inheritance, recursively, see for example our `mvc.SessionController`, it has the `Session *sessions.Session` and `Manager *sessions.Sessions` as embedded fields
|
||||
which are filled by its `BeginRequest`, [here](https://github.com/kataras/iris/blob/master/mvc/session_controller.go).
|
||||
This is just an example, you could use the `mvc.Session(mySessions)` as a dependency to the MVC Application, i.e
|
||||
`mvcApp.AddDependencies(mvc.Session(sessions.New(sessions.Config{Cookie: "iris_session_id"})))`.
|
||||
This is just an example, you could use the `sessions.Session` as a dependency to the MVC Application, i.e
|
||||
`mvcApp.AddDependencies(sessions.New(sessions.Config{Cookie: "iris_session_id"}).Start)`.
|
||||
|
||||
Access to the dynamic path parameters via the controller's methods' input arguments, no binding is needed.
|
||||
When you use the Iris' default syntax to parse handlers from a controller, you need to suffix the methods
|
||||
|
||||
Reference in New Issue
Block a user