/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Core/Configure/Engine
NameSizeModeActions
IniConfig.php63360644editdlrm
JsonConfig.php34340644editdlrm
PhpConfig.php33880644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php (3388B)
false, * 'Security' => [ * 'salt' => 'its-secret' * ], * 'App' => [ * 'namespace' => 'App' * ] * ]; * ``` * * @see \Cake\Core\Configure::load() for how to load custom configuration files. */ class PhpConfig implements ConfigEngineInterface { use FileConfigTrait; /** * File extension. * * @var string */ protected $_extension = '.php'; /** * Constructor for PHP Config file reading. * * @param string|null $path The path to read config files from. Defaults to CONFIG. */ public function __construct(?string $path = null) { if ($path === null) { $path = CONFIG; } $this->_path = $path; } /** * Read a config file and return its contents. * * Files with `.` in the name will be treated as values in plugins. Instead of * reading from the initialized path, plugin keys will be located using Plugin::path(). * * @param string $key The identifier to read from. If the key has a . it will be treated * as a plugin prefix. * @return array Parsed configuration values. * @throws \Cake\Core\Exception\Exception when files don't exist or they don't contain `$config`. * Or when files contain '..' as this could lead to abusive reads. */ public function read(string $key): array { $file = $this->_getFilePath($key, true); $config = null; $return = include $file; if (is_array($return)) { return $return; } throw new Exception(sprintf('Config file "%s" did not return an array', $key . '.php')); } /** * Converts the provided $data into a string of PHP code that can * be used saved into a file and loaded later. * * @param string $key The identifier to write to. If the key has a . it will be treated * as a plugin prefix. * @param array $data Data to dump. * @return bool Success */ public function dump(string $key, array $data): bool { $contents = '_getFilePath($key); return file_put_contents($filename, $contents) > 0; } }