mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Split RainLoop/Actions.php and use JsonSerializable
This commit is contained in:
parent
8cd2bd46d8
commit
9844c1882c
24 changed files with 3205 additions and 3066 deletions
|
|
@ -13,12 +13,10 @@ export class AbstractModel {
|
|||
*/
|
||||
constructor() {
|
||||
/*
|
||||
constructor(props) {
|
||||
if (new.target === Parent) {
|
||||
throw new Error("Can't instantiate abstract class!");
|
||||
}
|
||||
this.sModelName = new.target.name;
|
||||
props && Object.entries(props).forEach(([key, value]) => '@' !== key[0] && (this[key] = value));
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +57,8 @@ export class AbstractModel {
|
|||
// Object/Folder
|
||||
// Object/Message
|
||||
// Object/Template
|
||||
return this.validJson(json) ? new this(json) : null;
|
||||
return this.validJson(json) ? new this() : null;
|
||||
// json && Object.entries(json).forEach(([key, value]) => '@' !== key[0] && (this[key] = value));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue