remove the deprecated session controller as the dynamic dependency is much easier for understanding

Gerasimos (Makis) Maropoulos 2019-07-23 17:56:00 +03:00
parent f8d3c0b494
commit 8300833599
No known key found for this signature in database
GPG Key ID: F169457BBDA4ACF4

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.
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 `sessions.Session` which returned from the manager's `Start` as a dynamic dependency to the MVC Application, i.e
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:
`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.