本文整理汇总了PHP中AppConfig::securityKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP AppConfig::securityKeys方法的具体用法?PHP AppConfig::securityKeys怎么用?PHP AppConfig::securityKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppConfig
的用法示例。
在下文中一共展示了AppConfig::securityKeys方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
public static function load($key, $config)
{
switch ($key) {
case 'debug':
self::$debug = $config;
break;
case 'developer':
self::$developer = $config;
break;
case 'security':
self::$security = $config;
break;
case 'securityKeys':
self::$securityKeys = $config;
break;
case 'performance':
self::$performance = $config;
break;
case 'relation':
self::$relation = $config;
break;
}
}
示例2: zipData
public function zipData()
{
$log = vglobal('log');
$log->debug('Start ' . __CLASS__ . ':' . __FUNCTION__);
$dbFiles = $this->getFilesStructure();
$zip = new ZipArchive();
$destination = $this->tempDir . '/' . $this->get('filename') . '.files.zip';
$count = 1;
$allFiles = $this->get('allfiles');
$mainConfig = $this->getConfig('main');
$maxTime = ini_get('max_execution_time') * 0.5;
$startTime = self::getTime();
$singleMode = $mainConfig['type'] == 'true';
// Overall mode or Single mode
if ($zip->open($destination, ZIPARCHIVE::CREATE) && $allFiles != 0) {
foreach ($dbFiles as $id => $path) {
$start = self::getTime();
if (is_dir($path)) {
$zip->addEmptyDir($path . '/');
} elseif (is_file($path)) {
$zip->addFile($path, $path);
}
$this->markFile($id);
$this->updateProgress('5', $count / $allFiles * 100, self::getTime() - $start);
$count++;
if ($singleMode && self::getTime() - $startTime >= $maxTime) {
continue;
}
}
if (vglobal('encryptBackup') && version_compare(PHP_VERSION, '5.6.0') >= 0) {
$code = $zip->setPassword(AppConfig::securityKeys('backupPassword'));
if ($code === true) {
$log->debug('Backup files password protection is enabled');
} else {
$log->error('Has not been possible password protect your backup files');
}
}
$zip->close();
}
$log->debug('End ' . __CLASS__ . ':' . __FUNCTION__);
}