X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Frequest%2Fhtml%2Fclass_HtmlRequest.php;h=ba1b4c82708d6e8e4b9ad92683ca4529c382041e;hp=22f04c132230f6871b8c880e8dae8b324cfe3f35;hb=refs%2Fheads%2Fmaster;hpb=a60894f1d6ef33613d2d0351075aa07aa257f304 diff --git a/framework/main/classes/request/html/class_HtmlRequest.php b/framework/main/classes/request/html/class_HtmlRequest.php index 22f04c13..2fdb5312 100644 --- a/framework/main/classes/request/html/class_HtmlRequest.php +++ b/framework/main/classes/request/html/class_HtmlRequest.php @@ -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 * @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;