50 lines
940 B
PHP
50 lines
940 B
PHP
<?php
|
|
|
|
class Server
|
|
{
|
|
public $host;
|
|
public $secretKeyRobot;
|
|
|
|
public function __construct()
|
|
{
|
|
$appUrl = rtrim((string) (getenv('APP_URL') ?: 'https://spota.untan.ac.id'), '/');
|
|
$this->host = $appUrl;
|
|
$this->secretKeyRobot = (string) (getenv('SPOTA_LEGACY_API_SECRET') ?: 'in14d4lahP4ssWordSP0TA!12!');
|
|
}
|
|
|
|
public function getSecretKeyRobot()
|
|
{
|
|
return $this->secretKeyRobot;
|
|
}
|
|
|
|
public function getAPIUrl()
|
|
{
|
|
return $this->host.'/API/web';
|
|
}
|
|
|
|
public function getHostUrl()
|
|
{
|
|
return $this->host;
|
|
}
|
|
|
|
public function getLoginPage()
|
|
{
|
|
return $this->host;
|
|
}
|
|
|
|
public function getDataTableURL()
|
|
{
|
|
return $this->host.'/API/datatable';
|
|
}
|
|
|
|
public function getPrintUrl()
|
|
{
|
|
return $this->host.'/print';
|
|
}
|
|
|
|
public function getBerkasUrl()
|
|
{
|
|
return $this->host.'/berkas';
|
|
}
|
|
}
|