Cookie-based login initially done
[shipsimu.git] / inc / classes / interfaces / response / class_Responseable.php
index c7d21032d2223c6be2d3907e0be498e011c01c55..5fd6b50cc4a613fc6f9c7b75fefbe8065fabde7d 100644 (file)
@@ -56,7 +56,7 @@ interface Responseable extends FrameworkInterface {
         * @throws      ResponseHeadersAlreadySentException             Thrown if headers are
         *                                                                                                      already sent
         */
-       function flushBuffer($force=false);
+       function flushBuffer ($force = false);
 
        /**
         * Adds a fatal message id to the response. The added messages can then be
@@ -66,6 +66,27 @@ interface Responseable extends FrameworkInterface {
         * @return      void
         */
        function addFatalMessage ($messageId);
+
+       /**
+        * Adds a cookie to the response
+        *
+        * @param       $cookieName             Cookie's name
+        * @param       $cookieValue    Value to store in the cookie
+        * @param       $encrypted              Do some extra encryption on the value
+        * @return      void
+        * @throws      ResponseHeadersAlreadySentException             If headers are already sent
+        */
+       function addCookie ($cookieName, $cookieValue, $encrypted = false);
+
+       /**
+        * Redirect to a configured URL. The URL can be absolute or relative. In
+        * case of relative URL it will be extended automatically.
+        *
+        * @param       $configEntry    The configuration entry which holds our URL
+        * @return      void
+        * @throws      ResponseHeadersAlreadySentException             If headers are already sent
+        */
+       function redirectToConfiguredUrl ($configEntry);
 }
 
 //