summaryrefslogtreecommitdiff
path: root/matrix-specification/Request.php
blob: c9f315fb9f01d199491a4d81d7aaae6f5985e1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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();
  }
}