File tree Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace BNETDocs \Models \Server ;
4
4
5
- class Index extends \BNETDocs \Models \ActiveUser
5
+ class Index extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
6
6
{
7
7
public ?array $ server_types = null ;
8
8
public ?array $ servers = null ;
9
9
public ?array $ status_bitmasks = null ;
10
+
11
+ public function jsonSerialize (): mixed
12
+ {
13
+ return \array_merge (parent ::jsonSerialize (), [
14
+ 'server_types ' => $ this ->server_types ,
15
+ 'servers ' => $ this ->servers ,
16
+ 'status_bitmasks ' => $ this ->status_bitmasks ,
17
+ ]);
18
+ }
10
19
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace BNETDocs \Models \Server ;
4
4
5
- class UpdateJob extends \BNETDocs \Models \ActiveUser
5
+ class UpdateJob extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
6
6
{
7
- public int $ old_status_bitmask = 0 ;
8
- public ?\BNETDocs \Libraries \Server \Server $ server = null ;
7
+ public int $ old_status_bitmask = 0 ;
8
+ public ?\BNETDocs \Libraries \Server \Server $ server = null ;
9
+
10
+ public function jsonSerialize (): mixed
11
+ {
12
+ return \array_merge (parent ::jsonSerialize (), [
13
+ 'old_status_bitmask ' => $ this ->old_status_bitmask ,
14
+ 'server ' => $ this ->server ,
15
+ ]);
16
+ }
9
17
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace BNETDocs \Models \Server ;
4
4
5
- class View extends \BNETDocs \Models \ActiveUser
5
+ class View extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
6
6
{
7
- public ?\BNETDocs \Libraries \Server \Server $ server = null ;
7
+ public ?\BNETDocs \Libraries \Server \Server $ server = null ;
8
+
9
+ public function jsonSerialize (): mixed
10
+ {
11
+ return \array_merge (parent ::jsonSerialize (), ['server ' => $ this ->server ]);
12
+ }
8
13
}
You can’t perform that action at this time.
0 commit comments