2021-09-22 23:56:45 +03:00
|
|
|
module.exports = class CustomThemeSettingsCache {
|
|
|
|
constructor() {
|
|
|
|
this.content = new Object();
|
|
|
|
}
|
|
|
|
|
|
|
|
get(key) {
|
|
|
|
return this.content[key].value;
|
|
|
|
}
|
|
|
|
|
|
|
|
getAll() {
|
|
|
|
return this.content;
|
|
|
|
}
|
|
|
|
|
2021-09-23 11:16:59 +03:00
|
|
|
populate(settings) {
|
|
|
|
settings.forEach((setting) => {
|
2021-09-22 23:56:45 +03:00
|
|
|
this.content[setting.key] = setting.value;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|