Welcome Guest, Not a member yet? Register   Sign In
Hooks - pre_controller vs. post_controller_constructor

I got two hooks. "guardian" and "orm" both of them are now starting as "post_controller_constructor" beacuse I need db connection. 
But side effect is, that I can't use Orm and Guardian methods in controller constructor because they are not loaded yet. 
And it is very anoying to write the same code in to all controller methods because I can't use constructor to put it in.

I passed through by writing method postConstructor() which is called as first in controller method. And I put repeatly used code in it. 

But I don't like this sollution. 

Does enybody have an idea how to solve this better way?

Messages In This Thread
Hooks - pre_controller vs. post_controller_constructor - by Sezu - 03-28-2017, 12:27 AM

Theme © iAndrew 2016 - Forum software by © MyBB