This repository was archived by the owner on May 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttp.php
More file actions
91 lines (80 loc) · 1.78 KB
/
Copy pathHttp.php
File metadata and controls
91 lines (80 loc) · 1.78 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
declare(strict_types = 1);
namespace Innmind\ScalewaySdk\Authenticated;
use Innmind\ScalewaySdk\{
Authenticated,
Region,
Token,
};
use Innmind\HttpTransport\Transport;
use Innmind\TimeContinuum\Clock;
final class Http implements Authenticated
{
private Transport $transport;
private Clock $clock;
private Token\Id $token;
public function __construct(
Transport $transport,
Clock $clock,
Token\Id $token,
) {
$this->transport = $transport;
$this->clock = $clock;
$this->token = $token;
}
public function images(Region $region): Images
{
return new Images\Http(
$this->transport,
$region,
$this->token,
);
}
public function ips(Region $region): IPs
{
return new IPs\Http(
$this->transport,
$region,
$this->token,
);
}
public function servers(Region $region): Servers
{
return new Servers\Http(
$this->transport,
$region,
$this->token,
);
}
public function tokens(): Tokens
{
return new Tokens\Http(
$this->transport,
$this->clock,
$this->token,
);
}
public function users(): Users
{
return new Users\Http(
$this->transport,
$this->token,
);
}
public function volumes(Region $region): Volumes
{
return new Volumes\Http(
$this->transport,
$region,
$this->token,
);
}
public function marketplace(): Marketplace
{
return new Marketplace\Http(
$this->transport,
$this->clock,
$this->token,
);
}
}