| 1 | <?php |
||
| 8 | class Request |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string|null |
||
| 12 | */ |
||
| 13 | private $apiKey = null; |
||
| 14 | /** |
||
| 15 | * @var string|null |
||
| 16 | */ |
||
| 17 | private $url = null; |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $method; |
||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $args; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $url |
||
| 29 | * @param string $apiKey |
||
| 30 | * @param string $method |
||
| 31 | * @param array $args |
||
| 32 | */ |
||
| 33 | 36 | public function __construct(string $url, string $apiKey, string $method, $args = []) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Send the built request url against the etherpad lite instance |
||
| 43 | * |
||
| 44 | * @return ResponseInterface |
||
| 45 | */ |
||
| 46 | public function send(): ResponseInterface |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Returns the path of the request url |
||
| 60 | * |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | protected function getUrlPath(): string |
||
| 73 | |||
| 74 | /** |
||
| 75 | * Maps the given arguments from Client::__call to the parameter of the api method |
||
| 76 | * |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | 36 | public function getParams(): array |
|
| 96 | } |
||
| 97 |