refactor
- move elixForms API logic to specific folder - move everything else under Api folder
This commit is contained in:
+6
-4
@@ -11,7 +11,7 @@ use Core\RateLimiter\FileRateLimiter;
|
||||
use Core\RateLimiter\InMemoryRateLimiter;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Core\LoggerFactory;
|
||||
use Services\ExternalApiService;
|
||||
use ElixForms\ElixFormsClient;
|
||||
|
||||
$container = new Container();
|
||||
|
||||
@@ -51,9 +51,11 @@ $container->singleton(LoggerInterface::class, function($c) {
|
||||
return LoggerFactory::create($config->get('log_ident', 'api'));
|
||||
});
|
||||
|
||||
// External API service binding
|
||||
$container->singleton(ExternalApiService::class, function($c) {
|
||||
return new ExternalApiService();
|
||||
// ElixForms client binding
|
||||
$container->singleton(ElixFormsClient::class, function($c) {
|
||||
$config = $c->make(Config::class);
|
||||
$baseUrl = $config->get('elixforms_api_base_url');
|
||||
return new ElixFormsClient($baseUrl);
|
||||
});
|
||||
|
||||
// If you have other services, bind them here, for example:
|
||||
|
||||
Reference in New Issue
Block a user