mirror of
https://github.com/kataras/iris.git
synced 2025-03-14 08:36:28 +01:00
remove the deprecated session controller as the dynamic dependency is much easier for understanding
parent
f8d3c0b494
commit
8300833599
4
MVC.md
4
MVC.md
|
@ -88,9 +88,7 @@ useful to call middlewares or when many methods use the same collection of data.
|
||||||
|
|
||||||
Optional `EndRequest(ctx)` function to perform any finalization after any method executed.
|
Optional `EndRequest(ctx)` function to perform any finalization after any method executed.
|
||||||
|
|
||||||
Inheritance, recursively, see for example our `mvc.SessionController`, it has the `Session *sessions.Session` and `Manager *sessions.Sessions` as embedded fields
|
Inheritance, recursively, e.g. our [mvc session-controller example](https://github.com/kataras/iris/tree/master/_examples/mvc/session-controller), has the `Session *sessions.Session` as struct field which is filled by the sessions manager's `Start` as a dynamic dependency to the MVC Application:
|
||||||
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 `sessions.Session` which returned from the manager's `Start` as a dynamic dependency to the MVC Application, i.e
|
|
||||||
`mvcApp.Register(sessions.New(sessions.Config{Cookie: "iris_session_id"}).Start)`.
|
`mvcApp.Register(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.
|
Access to the dynamic path parameters via the controller's methods' input arguments, no binding is needed.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user