// 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
*
* @return void
*/
- protected function __construct () {
+ private function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
}
* @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;
// Does this header exist?
if (isset($_SERVER[$name])) {
$headerValue = $_SERVER[$name];
- } // END - if
+ }
// Return the value
return $headerValue;
* @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;
if (isset($_COOKIE[$cookieName])) {
// Then get it
$cookieValue = $_COOKIE[$cookieName];
- } // END - if
+ }
// Return the value
return $cookieValue;