File tree Expand file tree Collapse file tree 2 files changed +34
-12
lines changed Expand file tree Collapse file tree 2 files changed +34
-12
lines changed Original file line number Diff line number Diff line change 22
33namespace BNETDocs \Models \EventLog ;
44
5- class Index extends \BNETDocs \Models \ActiveUser
5+ class Index extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
66{
7- public bool $ acl_allowed = false ;
8- public ?array $ events = null ;
9- public int $ limit = 0 ;
10- public string $ order = '' ;
11- public int $ page = 0 ;
12- public int $ pages = 0 ;
13- public int $ sum_events = 0 ;
7+ public bool $ acl_allowed = false ;
8+ public ?array $ events = null ;
9+ public int $ limit = 0 ;
10+ public string $ order = '' ;
11+ public int $ page = 0 ;
12+ public int $ pages = 0 ;
13+ public int $ sum_events = 0 ;
14+
15+ public function jsonSerialize (): mixed
16+ {
17+ return \array_merge (parent ::jsonSerialize (), [
18+ 'acl_allowed ' => $ this ->acl_allowed ,
19+ 'events ' => $ this ->events ,
20+ 'limit ' => $ this ->limit ,
21+ 'order ' => $ this ->order ,
22+ 'page ' => $ this ->page ,
23+ 'pages ' => $ this ->pages ,
24+ 'sum_events ' => $ this ->sum_events ,
25+ ]);
26+ }
1427}
Original file line number Diff line number Diff line change 22
33namespace BNETDocs \Models \EventLog ;
44
5- class View extends \BNETDocs \Models \ActiveUser
5+ class View extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
66{
7- public bool $ acl_allowed = false ;
8- public ?\BNETDocs \Libraries \EventLog \Event $ event = null ;
9- public ?int $ id = null ;
7+ public bool $ acl_allowed = false ;
8+ public ?\BNETDocs \Libraries \EventLog \Event $ event = null ;
9+ public ?int $ id = null ;
10+
11+ public function jsonSerialize (): mixed
12+ {
13+ return \array_merge (parent ::jsonSerialize (), [
14+ 'acl_allowed ' => $ this ->acl_allowed ,
15+ 'event ' => $ this ->event ,
16+ 'id ' => $ this ->id ,
17+ ]);
18+ }
1019}
You can’t perform that action at this time.
0 commit comments