]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 17 Feb 2023 04:00:07 +0000 (05:00 +0100)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Feb 2023 04:00:07 +0000 (05:00 +0100)
- renamed method requestIsValid() to propper setter name
- also renamed class field to proper name

29 files changed:
framework/main/classes/controller/class_BaseController.php
framework/main/classes/controller/console/class_ConsoleDefaultController.php
framework/main/classes/controller/html/class_HtmlDefaultController.php
framework/main/classes/controller/html/class_HtmlLoginFailedController.php
framework/main/classes/controller/html/class_HtmlLogoutController.php
framework/main/classes/controller/html/class_HtmlStatusController.php
framework/main/classes/controller/image/class_ImageDefaultController.php
framework/main/classes/filter/auth/class_UserAuthFilter.php
framework/main/classes/filter/change/class_EmailChangeFilter.php
framework/main/classes/filter/change/class_PasswordChangeFilter.php
framework/main/classes/filter/checkboxes/class_RulesAcceptedFilter.php
framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php
framework/main/classes/filter/payment/class_PaymentDiscoveryFilter.php
framework/main/classes/filter/validator/class_EmailValidatorFilter.php
framework/main/classes/filter/validator/class_PasswordValidatorFilter.php
framework/main/classes/filter/validator/class_UserNameValidatorFilter.php
framework/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php
framework/main/classes/filter/verifier/class_BirthdayVerifierFilter.php
framework/main/classes/filter/verifier/class_ConfirmCodeVerifierFilter.php
framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php
framework/main/classes/filter/verifier/class_PasswordGuestVerifierFilter.php
framework/main/classes/filter/verifier/class_PasswordVerifierFilter.php
framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php
framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php
framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php
framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php
framework/main/classes/request/class_BaseRequest.php
framework/main/interfaces/request/class_Requestable.php
framework/main/tests/controller/console/class_TestsConsoleDefaultNewsController.php

index 675e87363746366c14aa32341423f798a4a4e368..8101dc46c0a868d020cabc62bed08753145956cb 100644 (file)
@@ -89,7 +89,7 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
                $this->executePreFilters($requestInstance, $responseInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
@@ -175,7 +175,7 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
                }
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index 689e565c5b093f060582580f3bd8bcaeab13af7b..58541a625ed3215845ea14b8134ebf5ac652808a 100644 (file)
@@ -71,7 +71,7 @@ class ConsoleDefaultController extends BaseController implements Controller {
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index d5a55d2847ecfefa13c3112c3e2fdfaf4f2aec15..ec431168267b0a85ab6d27882a8df268076d1a2e 100644 (file)
@@ -72,7 +72,7 @@ class HtmlDefaultController extends BaseController implements Controller {
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index 364a4d93e400ce078da23a5b1abf6235c81e4767..9faa8f437769bec7fe6cbcdd27b5fece802cd5bd 100644 (file)
@@ -71,7 +71,7 @@ class HtmlLoginFailedController extends BaseController implements Controller {
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index 8467dee075fa425ba1ac606e7208153d584232cd..f3519b99ba20be5834721b4c7628f56f3aa83e1a 100644 (file)
@@ -79,7 +79,7 @@ class HtmlLogoutController extends BaseController implements Controller {
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index 166025bd2100518b640ec8ad423ee8066ac6c7dc..9a40b5bb935877c155f4658ac7376c2925c9c9f4 100644 (file)
@@ -72,7 +72,7 @@ class HtmlStatusController extends BaseController implements Controller {
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index d8472d2a205ad882e28b5bd27c4f061e6a1aaefc..d2ce0f129e3cc9d083fdc6b68a26d111171188a7 100644 (file)
@@ -71,7 +71,7 @@ class ImageDefaultController extends BaseController implements Controller {
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
index 8f908ad3ce264523adb29f6c0ab7d59c23846988..c45ac7151fe287e39cfe2bb2ecce3f2f6064cc07 100644 (file)
@@ -103,7 +103,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
                        $authInstance->destroyAuthData();
 
                        // Mark the request as invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('auth_data_incomplete');
index 944a9f7cfe9d6b388b12ada411b3cc31a5850bfe..f5307e36a4a70c14664236f3b12cbbba7709b63c 100644 (file)
@@ -73,7 +73,7 @@ class EmailChangeFilter extends BaseFilter implements Filterable {
                // Is only first email set?
                if ((!empty($email1)) && (empty($email2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Email 2 is empty
                        $responseInstance->addFatalMessage('email2_empty');
@@ -85,7 +85,7 @@ class EmailChangeFilter extends BaseFilter implements Filterable {
                // Is only second email set?
                if ((empty($email1)) && (!empty($email2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Email 1 is empty
                        $responseInstance->addFatalMessage('email1_empty');
@@ -97,7 +97,7 @@ class EmailChangeFilter extends BaseFilter implements Filterable {
                // Do both match?
                if ($email1 != $email2) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Emails are mismatching
                        $responseInstance->addFatalMessage('emails_mismatch');
index c11536323d865094c56ebe3fdf70c9b1e906d8b0..49c7076a2399bcdf35b2f8cd6ea302ce2d036ec7 100644 (file)
@@ -74,7 +74,7 @@ class PasswordChangeFilter extends BaseFilter implements Filterable {
                // Is only first email set?
                if ((!empty($pass1)) && (empty($pass2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Email 2 is empty
                        $responseInstance->addFatalMessage('pass2_empty');
@@ -86,7 +86,7 @@ class PasswordChangeFilter extends BaseFilter implements Filterable {
                // Is only second pass set?
                if ((empty($pass1)) && (!empty($pass2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Email 1 is empty
                        $responseInstance->addFatalMessage('pass1_empty');
@@ -104,7 +104,7 @@ class PasswordChangeFilter extends BaseFilter implements Filterable {
                // Do both match?
                if ($pass1 != $pass2) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Emails are mismatching
                        $responseInstance->addFatalMessage('pass_mismatch');
index 9fc1d3db4c928d80780f83b0ec03e1cc5bb60913..787a231b4d82095ef8f5a6cc1cb1f8f5b0326aed 100644 (file)
@@ -72,7 +72,7 @@ class RulesAcceptedFilter extends BaseFilter implements Filterable {
                // Was the "rules" value found in form? And is it set?
                if (is_null($rules)) {
                        // Not found in form so stop processing here
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('rules_unchecked');
index a85c7817426b6a443ccafba501dc1477aca95ff1..13ea605e82a57467f4336a7b0e40f4c5e3345b40 100644 (file)
@@ -72,7 +72,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
                // Is it there?
                if (is_null($encryptRequest)) {
                        // Not found, so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Throw exception
                        throw new EncryptMissingException($this, CryptoHelper::EXCEPTION_ENCRYPT_MISSING);
@@ -87,7 +87,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
                // Is it the expected length?
                if (strlen($decryptedString) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length')) {
                        // Not found, so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Throw exception
                        throw new EncryptInvalidLengthException($this, CryptoHelper::EXCEPTION_ENCRYPT_INVALID);
index 0ff7d81ed0581ec1a518f92da55b935ff51ea7a5..c5843a4badc58bdffb02557a0d0a690534c493c1 100644 (file)
@@ -126,7 +126,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
                        GenericRegistry::getRegistry()->addInstance('payments', $discoveryInstance);
                } catch (NoConfigEntryException $e) {
                        // Something bad happend
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('payment_config_entry_error');
@@ -136,7 +136,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } catch (NoClassException $e) {
                        // Something bad happend
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('payment_class_error');
index 62b5647ff877b397e0609096a16be55520d64650..1c963ebcfbb2eec993934c3483d5f4f31709b5d6 100644 (file)
@@ -81,7 +81,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                        // Is the email still not set?
                        if ((is_null($email1)) || (is_null($email2))) {
                                // Not found in form so stop the filtering process
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->setIsRequestValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('email_unset');
@@ -90,7 +90,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                                throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                        } elseif ((empty($email1)) || (empty($email2))) {
                                // Email is empty
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->setIsRequestValid(FALSE);
 
                                // Is the email empty?
                                if (empty($email1)) {
@@ -108,7 +108,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                                throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                        } elseif ($this->ifEmailIsTaken($email1)) {
                                // Email is already taken
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->setIsRequestValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('email_taken');
@@ -117,7 +117,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                                throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                        } elseif ($email1 != $email2) {
                                // Emails didn't match
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->setIsRequestValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('emails_mismatch');
@@ -127,7 +127,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                        }
                } elseif (empty($email)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('email_empty');
index 90d72cb8c2ed559c69be5efffb096d20bddbf22f..c2857b34d7312341cdfa55c901b279a99217cd5f 100644 (file)
@@ -72,7 +72,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable {
                // Is the password still not set?
                if ((is_null($password1)) || (is_null($password2))) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_unset');
@@ -81,7 +81,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ((empty($password1)) || (empty($password2))) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Is the password empty?
                        if (empty($password1)) {
@@ -99,7 +99,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($password1 != $password2) {
                        // Passwords didn't match
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('pass_mismatch');
index 70ea0016771f3947da86f8c19f15bf300528a1d3..c91d6a73f280a9a5c10c9dd34fe73aea28beadc1 100644 (file)
@@ -75,7 +75,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable {
                // Is the username set?
                if (is_null($userName)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_unset');
@@ -84,7 +84,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($userName)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_empty');
@@ -93,7 +93,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($this->ifUserNameIsTaken($userName)) {
                        // Username is already taken
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_taken');
index 2623c7bd4553f542c68bae26bc4616e5a593a4cd..db4025379a7714aa577accb8672704198d38100a 100644 (file)
@@ -81,7 +81,7 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable {
                        // Is the password still not set?
                        if (is_null($password)) {
                                // Not found in form so stop the filtering process
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->setIsRequestValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('password_unset');
@@ -93,7 +93,7 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable {
 
                if (empty($password)) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_empty');
index 9e2a9f11aa645c178952f4415ea0e0a3509efb98..c5b5bc035f95d5c8c72f536f533a5d82de717578 100644 (file)
@@ -66,7 +66,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable {
                // Day of birth set?
                if (!$requestInstance->isRequestElementSet('birth_day')) {
                        // Day of birth isn't set
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('day_of_birth_unset');
@@ -75,7 +75,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable {
                // Month of birth set?
                if (!$requestInstance->isRequestElementSet('birth_month')) {
                        // Month of birth isn't set
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('month_of_birth_unset');
@@ -84,7 +84,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable {
                // Year of birth set?
                if (!$requestInstance->isRequestElementSet('birth_year')) {
                        // Year of birth isn't set
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('year_of_birth_unset');
@@ -109,7 +109,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable {
                // Is there a number or such? (we don't care about the value itself here)
                if (empty($birthCheck)) {
                        // Validation has failed
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('birthday_invalid');
index e5e8cde84d51cccde5af97f0411c9aeb46fb6dcc..928e481b0f7a2118a62d05e79e3f378210513439 100644 (file)
@@ -72,7 +72,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable {
                // Is this code set?
                if (is_null($confirmCode)) {
                        // Is not in request
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('confirm_code_unset');
@@ -81,7 +81,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($confirmCode)) {
                        // Email is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('confirm_code_empty');
@@ -99,7 +99,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable {
                // Do we have the same code or different?
                if ($userCode != $confirmCode) {
                        // Email is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Redirect to error page
                        $responseInstance->redirectToConfiguredUrl('confirm_code_invalid');
index 5e92facf6a123939db1e33af295551f000697e03..e02d001f8753d6a0d24a44ec33b8282ebdcbf9f5 100644 (file)
@@ -69,7 +69,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is the form set?
                if (($requestInstance->getRequestElement('command') !== 'do_form') || (!$requestInstance->isRequestElementSet('form'))) {
                        // Required field not set
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('command_form_invalid');
@@ -93,7 +93,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is this set?
                if (is_null($captchaCode)) {
                        // Not set so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_code_unset');
@@ -102,7 +102,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($captchaCode)) {
                        // Empty value so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_code_empty');
@@ -117,7 +117,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is this set?
                if (is_null($captchaHash)) {
                        // Not set so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_hash_unset');
@@ -126,7 +126,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($captchaHash)) {
                        // Empty value so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_hash_empty');
@@ -144,7 +144,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is this CAPTCHA valid?
                if ($hashedCode != $captchaHash) {
                        // Not the same so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_hash_mismatch');
index 998ee5cef1d0e5f7573abbc862cb9050754f8fcc..3978bf503607e6ae03417d549efb4f50a26f6640 100644 (file)
@@ -71,7 +71,7 @@ class PasswordGuestVerifierFilter extends BaseFilter implements Filterable {
                // Is the password still not set?
                if (is_null($password)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_unset');
@@ -80,7 +80,7 @@ class PasswordGuestVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($password)) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_empty');
index f74b455edc07f834ac116a3c44031a8a0c41b3f9..2b4e5240f43f54a28cfdd93892a054d0360a32ba 100644 (file)
@@ -70,7 +70,7 @@ class PasswordVerifierFilter extends BaseFilter implements Filterable {
                // Is the password still not set?
                if (is_null($password)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_unset');
@@ -79,7 +79,7 @@ class PasswordVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($password)) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_empty');
index fecfce37458a3af083497a8340745cc809f63d27..103ca592c309e428c356d19f62b3c21c5af7ffce 100644 (file)
@@ -74,7 +74,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable {
                // Is the username set?
                if (is_null($userName)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_guest_unset');
@@ -83,7 +83,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($userName)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_guest_empty');
@@ -92,7 +92,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($this->ifUserGuestIsTaken($userName) === false) {
                        // Username is already taken
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_guest_not_found');
index a5856458b073d8e580cbdf70d5b97de0a02633d2..4e31a976f8f9cad91301bbb6e0ed20fe339ec40c 100644 (file)
@@ -75,7 +75,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable {
                // Is the username set?
                if (is_null($userName)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_unset');
@@ -84,7 +84,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($userName)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_empty');
@@ -93,7 +93,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($this->ifUserNameIsTaken($userName) === false) {
                        // Username is already taken
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_not_found');
index 0d67e497b1f113ac7caf9d39ba2e508c435ca993..4ac0b26d3b2a8e943741063040fe8d23b4c2cc5f 100644 (file)
@@ -70,7 +70,7 @@ class UserStatusVerifierFilter extends BaseFilter implements Filterable {
                // Is the user account confirmed?
                if ((!$userInstance->isConfirmed()) && (!$userInstance->isGuest()) && ($requestInstance->getRequestElement('action') != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('action_status_problem'))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Redirect to configured URL
                        $responseInstance->redirectToConfiguredUrl('login_user_status');
index 19b68b2af659e460083e5431bd93e86b8df34f67..a39fd6956cbed2e7088bd35477ab7a2b3fdea535 100644 (file)
@@ -72,7 +72,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
                // Is the email address valid?
                if ($userInstance->ifEmailAddressExists() === false) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Redirect to configured URL
                        $responseInstance->redirectToConfiguredUrl('user_unconfirmed_email_missing');
@@ -84,7 +84,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
                // Is the user account confirmed?
                if ($userInstance->getField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed')) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->setIsRequestValid(FALSE);
 
                        // Redirect to configured URL
                        $responseInstance->redirectToConfiguredUrl('user_not_unconfirmed');
index 6736fea140ed80a10ad7ab3c9abbbbd751b09b10..d52d9914823a661d27f9816a802a495116032d91 100644 (file)
@@ -38,7 +38,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * valid so make sure your intercepting filters sets this attribute to false
         * when they need to intercept the data flow.
         */
-       private $requestIsValid = true;
+       private $isRequestValid = true;
 
        /**
         * Protected constructor
@@ -119,22 +119,22 @@ abstract class BaseRequest extends BaseFrameworkSystem {
        }
 
        /**
-        * Sets whether the request was valid (default: true)
+        * Sets whether the request was valid
         *
         * @param       $isValid        Whether the request is valid
         * @return      void
         */
-       public final function requestIsValid (bool $isValid = true) {
-               $this->requestIsValid = $isValid;
+       public final function setIsRequestValid (bool $isValid) {
+               $this->isRequestValid = $isValid;
        }
 
        /**
         * Returns whether this request is valid
         *
-        * @return      $requestIsValid         Whether this request is valid
+        * @return      $isRequestValid         Whether this request is valid
         */
        public final function isRequestValid () {
-               return $this->requestIsValid;
+               return $this->isRequestValid;
        }
 
 }
index 9d0146642a9b09bd1dfcc1af44f431a33c8d6773..d83bc5c30d1cd61573313085e6db1607d527e7b9 100644 (file)
@@ -70,17 +70,17 @@ interface Requestable extends FrameworkInterface {
        function getParameterNames ();
 
        /**
-        * Sets whether the request was valid (default: true)
+        * Sets whether the request was valid
         *
         * @param       $isValid        Whether the request is valid
         * @return      void
         */
-       function requestIsValid (bool $isValid = true);
+       function setIsRequestValid (bool $isValid);
 
        /**
         * Returns whether this request is valid
         *
-        * @return      $requestIsValid         Whether this request is valid
+        * @return      $isRequestValid         Whether this request is valid
         */
        function isRequestValid ();
 
index 8ed89f955305aca49d166aa938fe62a1b881e612..a4f485003491b916ec8850214880194dd8e927c0 100644 (file)
@@ -41,12 +41,17 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
         */
        private function __construct () {
                // Call parent constructor
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: CONSTRUCTED!');
                parent::__construct(__CLASS__);
 
                // Init additional filter chains
-               foreach (array('bootstrap', 'tests', 'shutdown') as $filterChain) {
+               foreach (['bootstrap', 'tests', 'shutdown'] as $filterChain) {
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: Initializing filterChain=%s ...', $filterChain));
                        $this->initFilterChain($filterChain);
                }
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: EXIT!');
        }
 
        /**
@@ -57,6 +62,7 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
         */
        public static final function createTestsConsoleDefaultNewsController (CommandResolver $resolverInstance) {
                // Create the instance
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: resolverInstance=%s - CALLED!', $resolverInstance->__toString()));
                $controllerInstance = new TestsConsoleDefaultNewsController();
 
                // Set the command resolver
@@ -67,6 +73,7 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter_class'));
 
                // Return the prepared instance
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: controllerInstance=%s - EXIT!', $controllerInstance->__toString()));
                return $controllerInstance;
        }
 
@@ -79,6 +86,7 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
         */
        public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the command instance from the resolver by sending a request instance to the resolver
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
                $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
 
                // Add more filters by the command
@@ -88,7 +96,8 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
                $this->executePreFilters($requestInstance, $responseInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: Invoking requestInstance->setIsRequestValid(TRUE) ...');
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
@@ -97,7 +106,11 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
                $this->executePostFilters($requestInstance, $responseInstance);
 
                // Flush the response out
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: Invoking responseInstance->flushBuffer() ...');
                $responseInstance->flushBuffer();
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TEST-CONSOLE-DEFAULT-NEWS-CONTROLLER: EXIT!');
        }
 
        /**