* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @category Teamwant * @package Teamwant */ namespace Teamwant\Prestashop17\Redis\Classes; //todo: poogarniac consty w wolnej chwili use Teamwant_Redis; require_once(_PS_MODULE_DIR_ . 'teamwant_redis/const.php'); class FileManager { public function parseConfigFile($file) { $template_file = TEAMWANT_REDIS_ROOT_DIR . '/config/' . $file; if (file_exists($template_file)) { $json = null; $json_1_3_0 = null; include $template_file; //upgrade to 1.3.0 if (isset($json) && $json) { return $this->upgradeTo_1_3_0_Version($json); } if (isset($json_1_3_0) && $json_1_3_0) { return $json_1_3_0; } } return ''; } public function saveConfigFile($file, $data) { $template_file = TEAMWANT_REDIS_ROOT_DIR . '/config/' . $file; $json = " [], '_config' => [], ]; } $this->saveConfigFile('_RedisConfiguration.php', json_encode($json_1_3_0)); return $json_1_3_0; } }