3 namespace CoreFramework\Request;
6 * A concrete request class
8 * @author Roland Haeder <webmaster@ship-simu.org>
10 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
11 * @license GNU GPL 3.0 or any newer version
12 * @link http://www.ship-simu.org
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 class ???Request extends BaseRequest implements Requestable {
29 * Protected constructor
33 protected function __construct () {
34 // Call parent constructor
35 parent::__construct(__CLASS__);
39 * Creates an instance of this class and prepares it a little
41 * @return $requestInstance An instance of this class
43 public final static function create???Request () {
45 $requestInstance = new ???Request();
47 // Prepare the HTTP request data for usage
48 $requestInstance->prepareRequestData();
50 // Return the prepared instance
51 return $requestInstance;
55 * Prepares the request data for usage
58 * @todo Needs to be implemented
60 protected function prepareRequestData () {
61 $this->partialStub("Please implement this method.");
65 * Getter for a header element or 'null' if header was not found
67 * @param $headerName Name of the header
68 * @return $headerValue Value of the header or 'null' if not found
70 public function getHeaderElement ($headerName) {
71 $this->partialStub("Please implement this method.");
75 * Getter for request method. This getter might be useful for security filters
77 * @return $requestMethod Used request method
79 public final function getRequestMethod () {
80 $this->partialStub("Please implement this method.");
81 return $_SERVER['REQUEST_METHOD'];
85 * Reads a cookie and returns it's value or null if not found
87 * @param $cookieName Name of cookie we shall read
88 * @return $cookieValue Value of cookie or null if not found
90 public final function readCookie ($cookieName) {
91 $this->partialStub("Please implement this method.");