summaryrefslogtreecommitdiff
path: root/matrix-specification/Request.php
diff options
context:
space:
mode:
Diffstat (limited to 'matrix-specification/Request.php')
-rw-r--r--matrix-specification/Request.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/matrix-specification/Request.php b/matrix-specification/Request.php
new file mode 100644
index 0000000..c9f315f
--- /dev/null
+++ b/matrix-specification/Request.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Matrix;
+
+use Matrix\Enums\ApiPathVersion;
+use Psr\Http\Message\RequestInterface;
+
+abstract class Request implements RequestInterface, \JsonSerializable
+{
+ abstract public function getUri(string $serverName, ApiPathVersion $version): string;
+
+ /**
+ * @return array<string, string>
+ */
+ abstract public function getQueryParameters(): array;
+
+ /**
+ * @return array<string, string>
+ */
+ abstract public function getBody(): array;
+
+ public function jsonSerialize(): array
+ {
+ return $this->getBody();
+ }
+}