OpenXE/classes/Components/EnvironmentConfig/EnvironmentConfigProvider.php

34 lines
717 B
PHP
Raw Normal View History

2021-05-21 08:49:41 +02:00
<?php
namespace Xentral\Components\EnvironmentConfig;
use Config;
use License;
final class EnvironmentConfigProvider
{
/** @var Config $config */
private $config;
/**
* @param Config $config
*/
2024-04-18 12:48:03 +02:00
public function __construct(Config $config)
2021-05-21 08:49:41 +02:00
{
$this->config = $config;
}
/**
* @return EnvironmentConfig
*/
public function createEnvironmentConfig(): EnvironmentConfig
{
$environmentConfig = new EnvironmentConfig(
$this->config->WFdbhost, $this->config->WFdbname, $this->config->WFdbuser,
2024-04-18 12:48:03 +02:00
$this->config->WFdbpass, $this->config->WFdbport, $this->config->WFuserdata
2021-05-21 08:49:41 +02:00
);
return $environmentConfig;
}
}