You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The route handling functions are setting some variables in static or singleton objects and everything runs fine between different objects. But the afterRouterMiddleware() function seems to forget all about these states. If i call the function just after $router->run() it runs fine but not as a callback.
I will write a more concrete example:
class AccessController
{
public static function authenticateForAdmin() {
User::getInstance()->setId(1337);
}
}
Hi!
I'm doing something like this
init stuff
$router->before stuff
$router->match stuff
$router->run(afterRouterMiddleware());
The route handling functions are setting some variables in static or singleton objects and everything runs fine between different objects. But the afterRouterMiddleware() function seems to forget all about these states. If i call the function just after $router->run() it runs fine but not as a callback.
I will write a more concrete example:
I think this behaviour is not supposed to happen.
The text was updated successfully, but these errors were encountered: