Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
backup
/
src
/
JetBackup
/
Settings
:
Settings.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace JetBackup\Settings; use JetBackup\Config\System; use JetBackup\Data\DBObject; use JetBackup\Data\ReflectionObject; use JetBackup\Exception\DBException; use JetBackup\Exception\FieldsValidationException; use JetBackup\Exception\IOException; use JetBackup\Factory; use JetBackup\JetBackup; use ReflectionException; use SleekDB\Exceptions\InvalidArgumentException; if (!defined( '__JETBACKUP__')) die('Direct access is not allowed'); abstract class Settings extends DBObject { const COLLECTION = 'settings'; /** * @param string $section * * @throws DBException * @throws \SleekDB\Exceptions\IOException * @throws InvalidArgumentException */ public function __construct(string $section) { parent::__construct(self::COLLECTION); $this->_load([ ['_setting_id', '=', $section] ]); $this->set('_setting_id', $section); } public static function getChangedFields(array $current, array $original):array { return array_keys(array_filter($current, function($value, $key) use ($original) { return !array_key_exists($key, $original) || $original[$key] !== $value; }, ARRAY_FILTER_USE_BOTH)); } }