File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
<?php /* vim: set colorcolumn= expandtab shiftwidth=2 softtabstop=2 tabstop=4 smarttab: */
2
2
namespace BNETDocs \Models \Packet ;
3
- class Form extends \BNETDocs \Models \ActiveUser
3
+ class Form extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
4
4
{
5
5
// possible values for $error:
6
6
const ERROR_ACL_DENIED = 'ACL_DENIED ' ;
@@ -21,4 +21,18 @@ class Form extends \BNETDocs\Models\ActiveUser
21
21
public $ form_fields ;
22
22
public $ packet ;
23
23
public $ products ;
24
+
25
+ /**
26
+ * Implements the JSON serialization function from the JsonSerializable interface.
27
+ */
28
+ public function jsonSerialize ()
29
+ {
30
+ return [
31
+ 'comments ' => $ this ->comments ,
32
+ 'error ' => $ this ->error ,
33
+ 'form_fields ' => $ this ->form_fields ,
34
+ 'packet ' => $ this ->packet ,
35
+ 'products ' => $ this ->products ,
36
+ ];
37
+ }
24
38
}
You can’t perform that action at this time.
0 commit comments