mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 19:37:03 +00:00
remove the old 'mvc' folder - examples are not changed yet - add the 'di' package inside the mvc2 package - which will be renamed to 'mvc' on the next commit - new mvc.Application and some dublications removed - The new version will be version 9 because it will contain breaking changes (not to the end-developer's controllers but to the API they register them) - get ready for 'Christmas Edition' for believers
Former-commit-id: c7114233dee90ee308c0a3e77ec2ad0c361094b8
This commit is contained in:
@@ -17,12 +17,12 @@ type SessionController struct {
|
||||
Session *sessions.Session
|
||||
}
|
||||
|
||||
// OnActivate called, once per application lifecycle NOT request,
|
||||
// BeforeActivate called, once per application lifecycle NOT request,
|
||||
// every single time the dev registers a specific SessionController-based controller.
|
||||
// It makes sure that its "Manager" field is filled
|
||||
// even if the caller didn't provide any sessions manager via the `app.Controller` function.
|
||||
func (s *SessionController) OnActivate(ca *ControllerActivator) {
|
||||
if didntBindManually := ca.Dependencies.BindIfNotExists(defaultSessionManager); didntBindManually {
|
||||
func (s *SessionController) BeforeActivate(ca *ControllerActivator) {
|
||||
if didntBindManually := ca.Dependencies.AddOnce(defaultSessionManager); didntBindManually {
|
||||
ca.Router.GetReporter().Add(
|
||||
`MVC SessionController: couldn't find any "*sessions.Sessions" bindable value to fill the "Manager" field,
|
||||
therefore this controller is using the default sessions manager instead.
|
||||
|
||||
Reference in New Issue
Block a user