File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 11<?php /* vim: set colorcolumn= expandtab shiftwidth=2 softtabstop=2 tabstop=4 smarttab: */
22namespace BNETDocs \Models \Packet ;
3- class Form extends \BNETDocs \Models \ActiveUser
3+ class Form extends \BNETDocs \Models \ActiveUser implements \JsonSerializable
44{
55 // possible values for $error:
66 const ERROR_ACL_DENIED = 'ACL_DENIED ' ;
@@ -21,4 +21,18 @@ class Form extends \BNETDocs\Models\ActiveUser
2121 public $ form_fields ;
2222 public $ packet ;
2323 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+ }
2438}
You can’t perform that action at this time.
0 commit comments