]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/request/html/class_HtmlRequest.php
Continued:
[core.git] / framework / main / classes / request / html / class_HtmlRequest.php
index 22f04c132230f6871b8c880e8dae8b324cfe3f35..2fdb53127153f83640430d24d13c8005d1a49811 100644 (file)
@@ -4,14 +4,14 @@ namespace Org\Mxchange\CoreFramework\Request;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Request\Requestable;
-use Org\Mxchange\CoreFramework\String\Utils\StringUtils;
+use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
 
 /**
  * A concrete and secured HTML request class to make HTML requests more abstract
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Move out the cookie part to a seperate class, e.g. Cookie
@@ -35,7 +35,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
         *
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
@@ -104,7 +104,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
         * @param       $headerName             Name of the header
         * @return      $headerValue    Value of the header or 'null' if not found
         */
-       public function getHeaderElement ($headerName) {
+       public function getHeaderElement (string $headerName) {
                // Default return value on error
                $headerValue = NULL;
 
@@ -114,7 +114,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
                // Does this header exist?
                if (isset($_SERVER[$name])) {
                        $headerValue = $_SERVER[$name];
-               } // END - if
+               }
 
                // Return the value
                return $headerValue;
@@ -135,7 +135,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
         * @param       $cookieName             Name of cookie we shall read
         * @return      $cookieValue    Value of cookie or null if not found
         */
-       public final function readCookie ($cookieName) {
+       public final function readCookie (string $cookieName) {
                // Default is no cookie with that name found
                $cookieValue = NULL;
 
@@ -143,7 +143,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
                if (isset($_COOKIE[$cookieName])) {
                        // Then get it
                        $cookieValue = $_COOKIE[$cookieName];
-               } // END - if
+               }
 
                // Return the value
                return $cookieValue;