3 namespace Org\Mxchange\CoreFramework\Request;
5 // Import framework stuff
6 use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
9 * An interface for requests
11 * @author Roland Haeder <webmaster@shipsimu.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.shipsimu.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 interface Requestable extends FrameworkInterface {
32 * Checks whether a request element is set
34 * @param $element Name of the request element we want to check
35 * @return $isSet Whether the request element is set
37 function isRequestElementSet (string $element);
40 * Getter for request element or 'null' if element was not found
42 * @param $element Name of the request element we want to check
43 * @return $value Value of the found request element or 'null' if the
44 * element was not found
46 function getRequestElement (string $element);
49 * Setter for request elements
51 * @param $element Request element to se
52 * @param $value Value to set
55 function setRequestElement (string $element, $value);
58 * Setter for request data array
60 * @param $requestData Request element to se
63 function setRequestData (array $requestData);
66 * Wrapper method for array_key() function for the request data array
68 * @return $array An array containing all array keys to return
70 function getParameterNames ();
73 * Sets whether the request was valid
75 * @param $isValid Whether the request is valid
78 function setIsRequestValid (bool $isValid);
81 * Returns whether this request is valid
83 * @return $isRequestValid Whether this request is valid
85 function isRequestValid ();