How do I access the controller and action name from the bootstrap file?
I've set up my app with the Security plugin like the Invo app tutorial displays. My authentication is done by a third-party library, and the Security plugin translates the integer access levels that library provides (ie: 1 = admin, 2 = employee, 3 = student), to role strings (ie: "Admin", etc). I would like to have that "role" accessible throughout the application, as well as other user properties provided by the third-party library. Long-story-short, I don't know the "role" of the user until after the beforeExecuteRoute() function is run. So, I'm considering reworking the Security class and just invoke it directly from the bootstrap file (since absolutely every controller/action in my app will require authentication).
However, to do that I need the controller and action names. In the Security-class-as-Plugin code, the beforeExecuteRoute() function gets passed the dispatcher. However, in my bootstrap, if I call $DI->get('dispatcher')->getControllerName(), I always get NULL.