* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
interface Requestable extends FrameworkInterface {
- /**
- * Prepares the request data for usage
- *
- * @return void
- */
- function prepareRequestData ();
-
/**
* Checks whether a request element is set
*
* @param $element Name of the request element we want to check
* @return $isSet Whether the request element is set
- * @throws MissingArrayElementsException Thrown if a request element is not set
*/
function isRequestElementSet ($element);
function getRequestElement ($element);
/**
- * Wrapper method for array_key() function for the request data array
- *
- * @return $array An array containing all array keys to return
- */
- function getParameterNames ();
-
- /**
- * Getter for a header element or 'null' if header was not found
+ * Setter for request elements
*
- * @param $headerName Name of the header
- * @return $headerValue Value of the header or 'null' if not found
- */
- function getHeaderElement ($headerName);
-
- /**
- * Sets whether the request was valid (default: TRUE)
- *
- * @param $isValid Whether the request is valid
+ * @param $element Request element to se
+ * @param $value Value to set
* @return void
*/
- function requestIsValid ($isValid = TRUE);
+ function setRequestElement ($element, $value);
/**
- * Reads a cookie and returns it's value or null if not found
+ * Setter for request data array
*
- * @param $cookieName Name of cookie we shall read
- * @return $cookieValue Value of cookie or null if not found
+ * @param $requestData Request element to se
+ * @return void
*/
- function readCookie ($cookieName);
+ function setRequestData (array $requestData);
/**
- * Checks if the request method is GET.
+ * Wrapper method for array_key() function for the request data array
*
- * @return $isGet Whether the request method is GET
+ * @return $array An array containing all array keys to return
*/
- function isGetRequestMethod ();
+ function getParameterNames ();
/**
- * Checks if the request method is HEAD.
+ * Sets whether the request was valid (default: true)
*
- * @return $isHead Whether the request method is HEAD
+ * @param $isValid Whether the request is valid
+ * @return void
*/
- function isHeadRequestMethod ();
+ function requestIsValid ($isValid = true);
/**
- * Checks if the request method is POST.
+ * Returns whether this request is valid
*
- * @return $isPost Whether the request method is POST
+ * @return $requestIsValid Whether this request is valid
*/
- function isPostRequestMethod ();
+ function isRequestValid ();
}