Adrià Vilanova Martínez | 6052433 | 2022-11-20 02:33:56 +0100 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | class Credentials { |
| 4 | public static function servername() { |
| 5 | return getenv('DB_SERVERNAME'); |
| 6 | } |
| 7 | |
| 8 | public static function username() { |
| 9 | return getenv('DB_USERNAME'); |
| 10 | } |
| 11 | |
| 12 | public static function password() { |
| 13 | return getenv('DB_PASSWORD'); |
| 14 | } |
| 15 | |
| 16 | public static function dbname() { |
| 17 | return getenv('DB_NAME'); |
| 18 | } |
| 19 | |
| 20 | public static function usersdb() { |
| 21 | return getenv('DB_USERS_DB'); |
| 22 | } |
| 23 | |
| 24 | public static function mortsdb() { |
| 25 | return getenv('DB_MORTS_DB'); |
| 26 | } |
| 27 | |
| 28 | public static function adminToken() { |
| 29 | return getenv('ADMIN_TOKEN'); |
| 30 | } |
Adrià Vilanova Martínez | c4ced6d | 2022-12-22 19:37:32 +0100 | [diff] [blame] | 31 | |
| 32 | public static function isAllVsAllModeEnabled() { |
| 33 | return self::allVsAllMode() == 1 || self::allVsAllMode() == 'true'; |
| 34 | } |
| 35 | |
| 36 | public static function allVsAllMode() { |
| 37 | return getenv('ALL_VS_ALL_MODE'); |
| 38 | } |
Adrià Vilanova Martínez | 6052433 | 2022-11-20 02:33:56 +0100 | [diff] [blame] | 39 | }; |