34 lines
1.2 KiB
PHP
34 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Central License Manager configuration.
|
|
*
|
|
* When this folder lives inside the main app repo it can reuse the parent
|
|
* project database automatically. If you move the folder elsewhere, either:
|
|
* 1) set CLM_DB_* environment variables, or
|
|
* 2) edit the DB values below.
|
|
*/
|
|
function clm_config(): array
|
|
{
|
|
static $config = null;
|
|
|
|
if ($config !== null) {
|
|
return $config;
|
|
}
|
|
|
|
$config = [
|
|
'manager_name' => getenv('CLM_MANAGER_NAME') ?: 'Central License Manager',
|
|
'table_prefix' => preg_replace('/[^a-zA-Z0-9_]/', '', getenv('CLM_TABLE_PREFIX') ?: 'clm_') ?: 'clm_',
|
|
'api_secret' => getenv('CLM_API_SECRET') ?: '1485-5215-2578',
|
|
'admin_password' => getenv('CLM_ADMIN_PASSWORD') ?: 'Meezan@2026',
|
|
'default_app_slug' => getenv('CLM_DEFAULT_APP_SLUG') ?: 'legacy',
|
|
'default_app_name' => getenv('CLM_DEFAULT_APP_NAME') ?: 'Legacy App',
|
|
'db_host' => getenv('CLM_DB_HOST') ?: '',
|
|
'db_name' => getenv('CLM_DB_NAME') ?: '',
|
|
'db_user' => getenv('CLM_DB_USER') ?: '',
|
|
'db_pass' => getenv('CLM_DB_PASS') ?: '',
|
|
'db_charset' => getenv('CLM_DB_CHARSET') ?: 'utf8mb4',
|
|
];
|
|
|
|
return $config;
|
|
}
|