Multiple init() functions in Action controller
I have an issue where some legacy code has been poorly implemented and a lot of code is executing in an Controller::init()
function that does not need to as most of this code is view related so it does not need to execute for a simple action API call.
Ordinarily I would move these API call type action functions into another Hazaar\Controller\Basic
controller, but given that this is legacy code this could be quite intrusive and break stable (albeit slow) code.
This experiment is to see how an Hazaar\Controller\Action
controller will fair if there is a ActionController::initView()
function that is executed when the first view or view layout is being loaded, if this can be used to execute the many addHelper()
calls that are currently in the Controller::init()
function.
This is also an additional feature so it will not break backwards compatibility.