|
|
@ -91,21 +91,15 @@ class Config { |
|
|
|
|
|
|
|
|
|
|
|
public static function getDatabaseCreds($mode = self::MODE) |
|
|
|
public static function getDatabaseCreds($mode = self::MODE) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$host = getenv("DB_HOST") ?: "192.168.11.45"; |
|
|
|
$host = getenv("DB_HOST") |
|
|
|
$name = getenv("DB_NAME") ?: "newschema"; |
|
|
|
$name = getenv("DB_NAME") |
|
|
|
$user = getenv("DB_USER") ?: "vaslak"; |
|
|
|
$user = getenv("DB_USER") |
|
|
|
$pass = getenv("DB_PASS") ?: "postgre2020"; |
|
|
|
$pass = getenv("DB_PASS") |
|
|
|
|
|
|
|
|
|
|
|
return array($host, $name, $user, $pass); //self::DB_CREDS['USER'], self::DB_CREDS['PASS']); |
|
|
|
return array($host, $name, $user, $pass); //self::DB_CREDS['USER'], self::DB_CREDS['PASS']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GEOSERVER API CONSTANTS |
|
|
|
|
|
|
|
// public static function getAPIBaseURL($api_name) { |
|
|
|
|
|
|
|
// return self::API_URL[$api_name]; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static function getAPICredentials($api_name) |
|
|
|
public static function getAPICredentials($api_name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$username = getenv("{$api_name}_USER"); |
|
|
|
$username = getenv("{$api_name}_USER"); |
|
|
@ -114,16 +108,5 @@ class Config { |
|
|
|
return array("username" => $username, "password" => $password); |
|
|
|
return array("username" => $username, "password" => $password); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// public static function getAPICredentials($api_name) |
|
|
|
|
|
|
|
// { |
|
|
|
|
|
|
|
// self::$api_creds = array( |
|
|
|
|
|
|
|
// "REPO" => getenv("CREDS_REPO"), |
|
|
|
|
|
|
|
// "GSRV" => getenv("CREDS_GSRV"), |
|
|
|
|
|
|
|
// "POSD" => getenv("CREDS_POSD"), |
|
|
|
|
|
|
|
// "WFD" => getenv("CREDS_WFD") |
|
|
|
|
|
|
|
// ); |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// return self::$api_creds[$api_name]; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|