X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcommands%2Fweb%2Fclass_WebLoginAreaCommand.php;h=98f76cd104db292415ac67d0358bd206958f0886;hb=ddac7be24465ecb1d885b3686a3037f10e2aec46;hp=3149a25d9f88930caedf713ffcf64fbba9049031;hpb=6d61b430c9bc33861d130064f049d3e1e80f089b;p=shipsimu.git diff --git a/inc/classes/main/commands/web/class_WebLoginAreaCommand.php b/inc/classes/main/commands/web/class_WebLoginAreaCommand.php index 3149a25..98f76cd 100644 --- a/inc/classes/main/commands/web/class_WebLoginAreaCommand.php +++ b/inc/classes/main/commands/web/class_WebLoginAreaCommand.php @@ -142,7 +142,7 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable { } /** - * Adds extra filters to the given controller instance + * Adds extra filters to the given controller instance. An corresponding action class must now exist! * * @param $controllerInstance A controller instance * @param $requestInstance An instance of a class with an Requestable interface @@ -179,22 +179,17 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable { // Get application instance $applicationInstance = $this->getResolverInstance()->getApplicationInstance(); - // Try to get an action resolver for the given action - try { - // Get a resolver - $actionResolver = WebActionResolver::createWebActionResolver($this->actionName, $applicationInstance); + // Get a resolver + $actionResolver = WebActionResolver::createWebActionResolver($this->actionName, $applicationInstance); - // Resolve the action - $actionInstance = $actionResolver->resolveAction(); + // Resolve the action + $actionInstance = $actionResolver->resolveAction(); - // Add more action-specific filters - $actionInstance->addExtraFilters($controllerInstance, $requestInstance); + // Add more action-specific filters + $actionInstance->addExtraFilters($controllerInstance, $requestInstance); - // Remember this action in registry - Registry::getRegistry()->addInstance('action', $actionInstance); - } catch (InvalidActionException $e) { - // Silently ignored because no special action was found - } + // Remember this action in registry + Registry::getRegistry()->addInstance('action', $actionInstance); } }