forked from rollun-lc/rollun-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHostSelectionInterface.php
More file actions
37 lines (31 loc) · 899 Bytes
/
HostSelectionInterface.php
File metadata and controls
37 lines (31 loc) · 899 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace OpenAPI\Client\Rest;
use InvalidArgumentException;
interface HostSelectionInterface
{
/**
* Sets the index of the host to which requests will be sent.
* To see all the hosts, you can run getHosts()
*
* @param int $index
* @throws InvalidArgumentException if no host is found with this index
*/
public function setHostIndex(int $index): void;
/**
* Returns an array of host settings
* example:
* [
* [
* "url" => "http://rollun-openapi/openapi/HelloUser/v1",
* "description" => "No description provided",
* ],
* [
* "url" => "http://localhost:8080/openapi/HelloUser/v1",
* "description" => "No description provided",
* ],
* ]
*
* @return array of array of host settings
*/
public function getHosts(): array;
}