]> git.mxchange.org Git - shipsimu.git/commitdiff
No controller instances are now passed to filters
authorRoland Häder <roland@mxchange.org>
Thu, 20 Nov 2008 19:58:15 +0000 (19:58 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Nov 2008 19:58:15 +0000 (19:58 +0000)
13 files changed:
application/ship-simu/main/actions/web/class_WebShipSimuLoginCompanyAction.php
application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentStartupHelpAction.php
application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentTrainingAction.php
application/ship-simu/main/actions/web/class_WebShipSimuLoginLogoutAction.php
application/ship-simu/main/actions/web/class_WebShipSimuLoginProfileAction.php
application/ship-simu/main/actions/web/class_WebShipSimuLoginRefillAction.php
application/ship-simu/main/commands/web/class_WebRefillFormCommand.php
application/ship-simu/main/commands/web/class_WebShipsimuGuestLoginCommand.php
application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php
application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php
application/ship-simu/main/commands/web/class_WebShipsimuUserLoginCommand.php
application/ship-simu/main/commands/web/goverment/class_WebShipsimuGovermentStartupCommand.php
application/ship-simu/main/controller/web/class_WebGovermentFailedController.php

index af4f88c4212600f9d00dd6fac5c3699a7ec44140..3b127b2e783202c2184e57c16f3e8e641274b7b3 100644 (file)
@@ -74,7 +74,7 @@ class WebShipSimuLoginCompanyAction extends BaseShipSimuAction implements Comman
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Check for user status by default
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
        }
 }
 
index 283afa482fd14138ae7de6eadc269013c7d04916..6640bd3e1970e225046977a36b0b3a128b37af84 100644 (file)
@@ -74,10 +74,10 @@ class WebShipSimuLoginGovermentStartupHelpAction extends BaseShipSimuAction impl
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Check for user status by default
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Check if goverment can pay startup help
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter'));
        }
 }
 
index c11ca43d81ed95358a969bc79fbb2529d6bacbc5..3f7c77bb254d5dda293dc6f8a17bc73ef95a928e 100644 (file)
@@ -74,10 +74,10 @@ class WebShipSimuLoginGovermentTrainingAction extends BaseShipSimuAction impleme
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Check for user status by default
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Check if goverment can pay a training
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_training_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_training_filter'));
        }
 }
 
index 3d6d5c3124ca6d222b0e7c712098e29ca98dbb73..67f258bf3540e0d2b9f819b8e1ba9b4373dc5c84 100644 (file)
@@ -73,7 +73,7 @@ class WebShipSimuLoginLogoutAction extends BaseShipSimuAction implements Command
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Check for user status by default
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
        }
 }
 
index 774b7255ea7ec3ddd7fd029ba728aeb026f13f9d..43897974712af568ab987c64c26f053ba7b9c28e 100644 (file)
@@ -74,7 +74,7 @@ class WebShipSimuLoginProfileAction extends BaseShipSimuAction implements Comman
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Check for user status by default
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
        }
 }
 
index 8119b3c56c498585405b85d178baa82f8da6e42c..a6b3b9b137057a774ccc32a7ffbcc96bbb8e86bb 100644 (file)
@@ -73,10 +73,10 @@ class WebShipSimuLoginRefillAction extends BaseShipSimuAction implements Command
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Check for user status by default
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Is the refill page active?
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
 
                // Add payment discovery filter
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('payment_discovery_filter', array($this)));
index 4717e1eeb8d895c72705a196e10d0615fb525341..5cae379a6f29333aaab4ca0ebc6e201e3553723e 100644 (file)
@@ -74,22 +74,22 @@ class WebRefillFormCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add user auth filter (we don't need an update of the user here because it will be redirected)
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
 
                // Add user status filter here
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Is the refill page active?
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
 
                // Verify password
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
 
                // Verify CAPTCHA code
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
 
                // Verify refill request
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_filter'));
 
                // Prepare a filter based on the requested type we shall refill
                $filterName = sprintf("refill_request_%s_book_filter", $requestInstance->getRequestElement('type'));
index 39742f8001a4d3c4d081b3af7b4033b8897a2d66..80e4a5d00423ce0fdee92fe574dc735b070e13ee 100644 (file)
@@ -102,13 +102,13 @@ class WebShipsimuGuestLoginCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add username verifier filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_guest_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_guest_verifier_filter'));
 
                // Add password verifier filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('passwd_guest_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('passwd_guest_verifier_filter'));
 
                // Add CAPTCHA verifier code
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_guest_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_guest_verifier_filter'));
        }
 }
 
index 417cee58a5a72ed9eaae08927b952484d7ed9938..3d66614de3c8278a4e23dc9d164a3e2401792bbf 100644 (file)
@@ -122,28 +122,28 @@ class WebShipsimuProfileCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add user auth filter (we don't need an update of the user here because it will be redirected)
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
 
                // User status filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Updated rules accepted
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_filter'));
 
                // Account password validation
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
 
                // Validate CAPTCHA input
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_profile_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_profile_verifier_filter'));
 
                // Validate birthday input
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_profile_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_profile_verifier_filter'));
 
                // Email changed
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_change_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_change_filter'));
 
                // Password changed
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_change_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_change_filter'));
        }
 }
 
index 0f1822b8fb923947e878f19c33d4db57062dd95d..c47c4a6b73983825b8615d4699e06781b3a0acfe 100644 (file)
@@ -95,25 +95,25 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Validate email address (if configured: check on double email addresses)
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator_filter'));
 
                // Validate username and check if it does not exist
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator_filter'));
 
                // Validate if username is "guest" and not taken
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_is_guest_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_is_guest_filter'));
 
                // Validate if password is set
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_validator_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_validator_filter'));
 
                // Check if rules where accepted
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_filter'));
 
                // Validate CAPTCHA input
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_register_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_register_verifier_filter'));
 
                // Validate birthday
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_register_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_register_verifier_filter'));
        }
 }
 
index ffcc903d092ed213264e426ed218da2fbe6caf86..e554d9ac6fb46d2bd18f2c571d7da9fc60507e8e 100644 (file)
@@ -104,23 +104,23 @@ class WebShipsimuUserLoginCommand extends BaseCommand implements Commandable {
                // Which login type do we have?
                switch ($this->getConfigInstance()->readConfig('login_type')) {
                        case "username": // Login via username
-                               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter', array($controllerInstance)));
+                               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter'));
                                break;
 
                        case "email": // Login via email
-                               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_verifier_filter', array($controllerInstance)));
+                               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_verifier_filter'));
                                break;
 
                        default: // Wether username or email is set
-                               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_email_verifier_filter', array($controllerInstance)));
+                               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_email_verifier_filter'));
                                break;
                }
 
                // Password verifier filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_filter'));
 
                // Add filter for CAPTCHA
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_user_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_user_verifier_filter'));
        }
 }
 
index cd203e5cfd804467e82d8c2791656f47bf26aa51..18a3bc00e66d2c1f8d1daf1ca40e382a942d1881 100644 (file)
@@ -72,19 +72,19 @@ class WebShipsimuGovermentStartupCommand extends BaseCommand implements Commanda
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add user auth filter (we don't need an update of the user here because it will be redirected)
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
 
                // Add user status filter here
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Check if goverment can pay startup help
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter'));
 
                // Verify password
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
 
                // Verify CAPTCHA code
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
        }
 }
 
index eb5882bb1dcee244f249cdf935061a8f3ba2c122..d945d9a80eda4615d903cd11c6ef8f63f4882717 100644 (file)
@@ -47,16 +47,16 @@ class WebGovermentFailedController extends BaseController implements Controller
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // User auth filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
 
                // User update filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter'));
 
                // News fetcher filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
 
                // News proccess/display-preparation
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter', array($controllerInstance)));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
 
                // Return the prepared instance
                return $controllerInstance;