classes/bfw/Response.php
changeset 0 4869aea77e21
child 1 56e0dbd5c243
new file mode 100644
--- /dev/null
+++ b/classes/bfw/Response.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace bfw {
+    /**
+     * Response Headers sind kompliziert
+     *
+     */
+    class Response {
+        private $headers;
+        private $statusCode;
+
+        public function __construct() {
+            $this->headers = headers_list();
+            $this->statusCode = http_response_code();
+        }
+
+        public function getHeaders() {
+            return $this->headers;
+        }
+
+        public function setStatusCode($statusCode) {
+            $this->statusCode = $statusCode;
+
+            return $this;
+        }
+
+        public function getStatusCode() {
+            return $this->statusCode;
+        }
+
+        /**
+         * @return string
+         */
+        public function get($key) {
+            if (array_key_exists($key, $this->headers)) {
+                return $this->headers[$key];
+            }
+
+            return '';
+        }
+
+    }
+}
\ No newline at end of file