| @@ -11,47 +11,47 @@ | ||
| 11 | 11 | private $containerId; | 
| 12 | 12 | private $statusCache; | 
| 13 | 13 | |
| 14 | -    public function __construct(KeyManager $km, string $id) { | |
| 14 | +    public function __construct (KeyManager $km, string $id) { | |
| 15 | 15 | parent::__construct($km); | 
| 16 | 16 | $this->containerId = $id; | 
| 17 | 17 | $this->UpdateStatus(); | 
| 18 | 18 | } | 
| 19 | 19 | |
| 20 | -    private function UpdateStatus() { | |
| 20 | +    private function UpdateStatus () { | |
| 21 | 21 |          $request = Request::get("https://api.csfcloud.com/container/" . urlencode($this->containerId) . "?key=" . urlencode($this->keymanager->GetServerKey()))->expectsText()->send(); | 
| 22 | 22 | $this->statusCache = json_decode($request->body, true); | 
| 23 | 23 | } | 
| 24 | 24 | |
| 25 | -    public function GetId() : string { | |
| 25 | +    public function GetId () : string { | |
| 26 | 26 | return $this->containerId; | 
| 27 | 27 | } | 
| 28 | 28 | |
| 29 | -    public function GetConfiguration() : array { | |
| 29 | +    public function GetConfiguration () : array { | |
| 30 | 30 | return $this->statusCache["configuration"]; | 
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | -    public function SetConfiguration(array $cnf) { | |
| 33 | +    public function SetConfiguration (array $cnf) { | |
| 34 | 34 | $this->statusCache["configuration"] = $cnf; | 
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | -    public function UpdateChanges() { | |
| 37 | +    public function UpdateChanges () { | |
| 38 | 38 |          Request::put("https://api.csfcloud.com/container/" . urlencode($this->containerId) . "?key=" . urlencode($this->keymanager->GetServerKey())) | 
| 39 | 39 | ->sendsJson()->body(json_encode($this->statusCache["configuration"]))->send(); | 
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | -    public function GetContainerName() : string { | |
| 42 | +    public function GetContainerName () : string { | |
| 43 | 43 | return $this->statusCache["configuration"]["name"]; | 
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | -    public function SetContainerName(string $newname) { | |
| 46 | +    public function SetContainerName (string $newname) { | |
| 47 | 47 | $this->statusCache["configuration"]["name"] = $newname; | 
| 48 | 48 | } | 
| 49 | 49 | |
| 50 | -    public function IsRunning() : bool { | |
| 50 | +    public function IsRunning () : bool { | |
| 51 | 51 | return $this->statusCache["running"]; | 
| 52 | 52 | } | 
| 53 | 53 | |
| 54 | -    public function GetLastLogId() : ?string { | |
| 54 | +    public function GetLastLogId () : ?string { | |
| 55 | 55 | return $this->statusCache["last_log"]; | 
| 56 | 56 | } | 
| 57 | 57 | |