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 af4f88c..3b127b2 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 283afa4..6640bd3 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 c11ca43..3f7c77b 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 3d6d5c3..67f258b 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 774b725..4389797 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 8119b3c..a6b3b9b 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 4717e1e..5cae379 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 39742f8..80e4a5d 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 417cee5..3d66614 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 0f1822b..c47c4a6 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 ffcc903..e554d9a 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 cd203e5..18a3bc0 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 eb5882b..d945d9a 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;