2016-09-05 20:25:38 +05:30
|
|
|
<?php
|
|
|
|
namespace api\modules\session\models\protocols;
|
|
|
|
|
|
|
|
class ModernJoin extends BaseJoin {
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
private readonly string $accessToken;
|
2018-04-18 02:17:25 +05:30
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
private readonly string $selectedProfile;
|
2018-04-18 02:17:25 +05:30
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
private readonly string $serverId;
|
2016-09-05 20:25:38 +05:30
|
|
|
|
|
|
|
public function __construct(string $accessToken, string $selectedProfile, string $serverId) {
|
2017-09-19 22:36:16 +05:30
|
|
|
$this->accessToken = trim($accessToken);
|
|
|
|
$this->selectedProfile = trim($selectedProfile);
|
|
|
|
$this->serverId = trim($serverId);
|
2016-09-05 20:25:38 +05:30
|
|
|
}
|
|
|
|
|
2017-09-19 22:36:16 +05:30
|
|
|
public function getAccessToken(): string {
|
2016-09-05 20:25:38 +05:30
|
|
|
return $this->accessToken;
|
|
|
|
}
|
|
|
|
|
2017-09-19 22:36:16 +05:30
|
|
|
public function getSelectedProfile(): string {
|
2016-09-05 20:25:38 +05:30
|
|
|
return $this->selectedProfile;
|
|
|
|
}
|
|
|
|
|
2017-09-19 22:36:16 +05:30
|
|
|
public function getServerId(): string {
|
2016-09-05 20:25:38 +05:30
|
|
|
return $this->serverId;
|
|
|
|
}
|
|
|
|
|
2017-09-19 22:36:16 +05:30
|
|
|
public function validate(): bool {
|
|
|
|
return !$this->isEmpty($this->accessToken) && !$this->isEmpty($this->selectedProfile) && !$this->isEmpty($this->serverId);
|
2016-09-05 20:25:38 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
}
|