Files
api/services/nginx/app/modules/fxratesapi/fxratesapi_c.php
T
Jepp9350 9b53ae4403 Add fxratesapi module for currency conversion functionality
Integrated a new fxratesapi module to handle currency conversions, including API configurations, rate conversion actions, and request logging. Added support for module settings such as enablement status, API key, and daily request limits. New routes, database interactions, and object handling were implemented to facilitate the module's operations.
2025-03-31 13:19:45 +02:00

45 lines
1.3 KiB
PHP

<?php
namespace fxratesapi;
require_once WD . '/modules/fxratesapi/config/fxratesapi_enabled_c.php';
require_once WD . '/modules/fxratesapi/config/fxratesapi_secret_key_c.php';
require_once WD . '/modules/fxratesapi/config/fxratesapi_daily_limit_c.php';
use fxratesapi\config\fxratesapi_daily_limit_c;
use fxratesapi\config\fxratesapi_enabled_c;
use fxratesapi\config\fxratesapi_secret_key_c;
use traits\module_config_t;
class fxratesapi_c
{
use module_config_t;
/**
* The status of the fxratesapi module
* @var fxratesapi_enabled_c
*/
public fxratesapi_enabled_c $enabled;
/**
* The secret key for the fxratesapi module (API token)
* @var fxratesapi_secret_key_c
*/
public fxratesapi_secret_key_c $secret_key;
/**
* The daily limit for the fxratesapi module
* @var fxratesapi_daily_limit_c
*/
public fxratesapi_daily_limit_c $daily_limit;
public function __construct()
{
$this->setupConfig('fxratesapi');
$this->allowUpdate([
fxratesapi_enabled_c::class,
fxratesapi_secret_key_c::class,
fxratesapi_daily_limit_c::class
]);
$this->enabled = new fxratesapi_enabled_c();
$this->secret_key = new fxratesapi_secret_key_c();
$this->daily_limit = new fxratesapi_daily_limit_c();
}
}