Total Complexity | 4 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Ides extends CloudApiBase implements CloudApiInterface |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Returns a list of remote IDEs. |
||
19 | * |
||
20 | * @param string $applicationUuid The application ID |
||
21 | * @return IdesResponse |
||
22 | */ |
||
23 | public function getAll($applicationUuid) |
||
29 | ) |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Get remote IDE info. |
||
35 | * |
||
36 | * @param string $ideUuid The Remote IDE universally unique identifier. |
||
37 | * @return IdeResponse |
||
38 | */ |
||
39 | public function get($ideUuid) |
||
40 | { |
||
41 | return new IdeResponse( |
||
42 | $this->client->request( |
||
43 | 'get', |
||
44 | "/ides/${ideUuid}" |
||
45 | ) |
||
46 | ); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Creates a new remote IDE. |
||
51 | * |
||
52 | * @param string $applicationUuid |
||
53 | * @param string $name |
||
54 | * @return OperationResponse |
||
55 | */ |
||
56 | public function create($applicationUuid, $name) |
||
57 | { |
||
58 | |||
59 | $options = [ |
||
60 | 'form_params' => [ |
||
61 | 'name' => $name, |
||
62 | ], |
||
63 | ]; |
||
64 | |||
65 | return new OperationResponse( |
||
66 | $this->client->request('post', "/applications/${applicationUuid}/ides", $options) |
||
67 | ); |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * De-provisions a specific Remote IDE. |
||
72 | * |
||
73 | * @param string $ideUuid |
||
74 | * @return OperationResponse |
||
75 | */ |
||
76 | public function delete($ideUuid) |
||
80 | ); |
||
81 | } |
||
82 | } |
||
83 |