]> git.mxchange.org Git - core.git/blobdiff - framework/main/interfaces/request/class_Requestable.php
Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / interfaces / request / class_Requestable.php
index 24b295a941fee9280cd60b70e8224bb44e644dd8..1f33bcc364539143c1bb8219b54ce14e150725af 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 // Own namespace
-namespace CoreFramework\Request;
+namespace Org\Mxchange\CoreFramework\Request;
 
 // Import framework stuff
-use CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 
 /**
  * An interface for requests
@@ -28,19 +28,11 @@ use CoreFramework\Generic\FrameworkInterface;
  * 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);
 
@@ -54,55 +46,42 @@ interface Requestable extends FrameworkInterface {
        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 ();
 
 }