| @copyright 2007-2026 (c) AVE.cms | @link https://ave-cms.ru | @version 3.3 */ namespace App\Common; defined('BASEPATH') || die('Direct access to this location is not allowed.'); /** Protected local secret data owned by an installable module. */ class ModuleSecretStore { public static function read($module) { $file = self::file($module); $data = is_file($file) ? include $file : array(); return is_array($data) ? $data : array(); } public static function write($module, array $values) { $file = self::file($module); $dir = dirname($file); if (!is_dir($dir) && !@mkdir($dir, 0700, true)) { throw new \RuntimeException('Не удалось создать каталог секретов модуля'); } @chmod($dir, 0700); $content = "