]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/request/class_BaseRequest.php
Continued:
[core.git] / framework / main / classes / request / class_BaseRequest.php
index c501680a13e8f90afc7157b5f9cb1ff57706021e..d52d9914823a661d27f9816a802a495116032d91 100644 (file)
@@ -10,7 +10,7 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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
@@ -56,7 +56,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @param       $element        Name of the request element we want to check
         * @return      $isSet          Whether the request element is set
         */
-       public function isRequestElementSet ($element) {
+       public function isRequestElementSet (string $element) {
                // Is this element found?
                $isSet = isset($this->requestData[$element]);
 
@@ -71,7 +71,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @return      $value          Value of the found request element or 'null' if the
         *                                              element was not found
         */
-       public function getRequestElement ($element) {
+       public function getRequestElement (string $element) {
                // Initialize value
                $value = NULL;
 
@@ -82,7 +82,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
 
                        // Secure it against attacks
                        $value = htmlentities(strip_tags($value), ENT_QUOTES);
-               } // END - if
+               }
 
                // Return the element's value
                return $value;
@@ -95,7 +95,7 @@ abstract class BaseRequest extends BaseFrameworkSystem {
         * @param       $value          Value to set
         * @return      void
         */
-       public function setRequestElement ($element, $value) {
+       public function setRequestElement (string $element, $value) {
                $this->requestData[$element] = $value;
        }
 
@@ -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;
        }
 
 }