mirror of
https://github.com/kmvan/x-prober.git
synced 2026-04-22 09:18:58 +08:00
adjust config
This commit is contained in:
@@ -14,7 +14,7 @@ final class ConfigGeneration
|
||||
{
|
||||
[
|
||||
'phpConfigPath' => $this->phpConfigPath,
|
||||
'configPath' => $this->configPath,
|
||||
'configPath' => $this->configPath,
|
||||
'configPathDev' => $this->configPathDev,
|
||||
] = $args;
|
||||
|
||||
@@ -50,25 +50,7 @@ final class ConfigGeneration
|
||||
return false;
|
||||
}
|
||||
|
||||
[
|
||||
'APP_VERSION' => $appVersion,
|
||||
'APP_NAME' => $appName,
|
||||
'APP_URL' => $appUrl,
|
||||
'APP_CONFIG_URLS' => $appConfigUrls,
|
||||
'APP_CONFIG_URL_DEV' => $appConfigUrlDev,
|
||||
'APP_TEMPERATURE_SENSOR_URL' => $appTemperatureSensorUrl,
|
||||
'APP_TEMPERATURE_SENSOR_PORTS' => $appTemperatureSensorPorts,
|
||||
'AUTHOR_URL' => $authorUrl,
|
||||
'UPDATE_PHP_URLS' => $updatePhpUrls,
|
||||
'AUTHOR_NAME' => $authorName,
|
||||
'LATEST_PHP_STABLE_VERSION' => $latestPhpStableVersion,
|
||||
'LATEST_NGINX_STABLE_VERSION' => $latestNginxStableVersion,
|
||||
] = $config;
|
||||
|
||||
$updatePhpUrls = implode("', '", $updatePhpUrls);
|
||||
$appConfigUrls = implode("', '", $appConfigUrls);
|
||||
$appTemperatureSensorPorts = implode(', ', $appTemperatureSensorPorts);
|
||||
|
||||
$config = var_export($config, true);
|
||||
$configContent = <<<PHP
|
||||
<?php
|
||||
/**
|
||||
@@ -79,18 +61,7 @@ namespace InnStudio\\Prober\\Components\\Config;
|
||||
|
||||
class ConfigApi
|
||||
{
|
||||
public static \$APP_VERSION = '{$appVersion}';
|
||||
public static \$APP_NAME = '{$appName}';
|
||||
public static \$APP_URL = '{$appUrl}';
|
||||
public static \$APP_CONFIG_URLS = array('{$appConfigUrls}');
|
||||
public static \$APP_CONFIG_URL_DEV = '{$appConfigUrlDev}';
|
||||
public static \$APP_TEMPERATURE_SENSOR_URL = '{$appTemperatureSensorUrl}';
|
||||
public static \$APP_TEMPERATURE_SENSOR_PORTS = array({$appTemperatureSensorPorts});
|
||||
public static \$AUTHOR_URL = '{$authorUrl}';
|
||||
public static \$UPDATE_PHP_URLS = array('{$updatePhpUrls}');
|
||||
public static \$AUTHOR_NAME = '{$authorName}';
|
||||
public static \$LATEST_PHP_STABLE_VERSION = '{$latestPhpStableVersion}';
|
||||
public static \$LATEST_NGINX_STABLE_VERSION = '{$latestNginxStableVersion}';
|
||||
public static \$config = {$config};
|
||||
}
|
||||
|
||||
PHP;
|
||||
|
||||
Reference in New Issue
Block a user