3 namespace Org\Mxchange\CoreFramework\Request;
5 // Import framework stuff
6 use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
9 * A concrete request class
11 * @author Roland Haeder <webmaster@ship-simu.org>
13 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
14 * @license GNU GPL 3.0 or any newer version
15 * @link http://www.ship-simu.org
17 * This program is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30 class ???Request extends BaseRequest implements Requestable {
32 * Protected constructor
36 private function __construct () {
37 // Call parent constructor
38 parent::__construct(__CLASS__);
42 * Creates an instance of this class and prepares it a little
44 * @return $requestInstance An instance of this class
46 public final static function create???Request () {
48 $requestInstance = new ???Request();
50 // Prepare the HTTP request data for usage
51 $requestInstance->prepareRequestData();
53 // Return the prepared instance
54 return $requestInstance;
58 * Prepares the request data for usage
61 * @todo Needs to be implemented
63 protected function prepareRequestData () {
64 DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
68 * Getter for a header element or 'null' if header was not found
70 * @param $headerName Name of the header
71 * @return $headerValue Value of the header or 'null' if not found
73 public function getHeaderElement ($headerName) {
74 DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
78 * Getter for request method. This getter might be useful for security filters
80 * @return $requestMethod Used request method
82 public final function getRequestMethod () {
83 DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");
84 return $_SERVER['REQUEST_METHOD'];
88 * Reads a cookie and returns it's value or null if not found
90 * @param $cookieName Name of cookie we shall read
91 * @return $cookieValue Value of cookie or null if not found
93 public final function readCookie ($cookieName) {
94 DebugMiddleware::getSelfInstance()->partialStub("Please implement this method.");