*/
private $requestData = array();
+ /**
+ * Wether this request is valid and can be further processed. The default is
+ * valid so make sure your intercepting filters sets this attribute to false
+ * when they need to intercept the data flow.
+ */
+ private $requestIsValid = true;
+
/**
* Protected constructor
*
parent::__construct(__CLASS__);
// Set part description
- $this->setObjectDescription("HTTP-Anfrage");
+ $this->setObjectDescription("HTTP request");
// Create unique ID number
- $this->createUniqueID();
+ $this->generateUniqueId();
// Clean up a little
$this->removeNumberFormaters();
return $value;
}
+ /**
+ * Setter for request elements
+ *
+ * @param $element Request element to se
+ * @param $value Value to set
+ * @return void
+ */
+ public function setRequestElement ($element, $value) {
+ $this->requestData[$element] = $value;
+ }
+
/**
* Wrapper method for array_key() function for the request data array
*
// Return the value
return $headerValue;
}
+
+ /**
+ * Getter for request method. This getter might be useful for security filters
+ *
+ * @return $requestMethod Used request method
+ */
+ public final function getRequestMethod () {
+ return $_SERVER['REQUEST_METHOD'];
+ }
+
+ /**
+ * Sets wether the request was valid (default: true)
+ *
+ * @param $isValid Wether the request is valid
+ * @return void
+ */
+ public final function requestIsValid ($isValid = true) {
+ $this->requestIsValid = (bool) $isValid;
+ }
+
+ /**
+ * Returns wether this request is valid
+ *
+ * @return $requestIsValid Wether this request is valid
+ */
+ public final function isRequestValid () {
+ return $this->requestIsValid;
+ }
}
// [EOF]