Changeset 1779004
- Timestamp:
- 11/30/2017 08:36:39 PM (8 years ago)
- Location:
- up-user-datakeeper/trunk/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
up-user-datakeeper/trunk/class/api.php
r1778970 r1779004 26 26 } 27 27 28 public static function encode($data){ 29 return Utils::encode($data); 30 } 28 31 29 32 public static function decode($data){ 33 return Utils::decode($data); 34 } 30 35 } 31 36 -
up-user-datakeeper/trunk/class/utils.php
r1778970 r1779004 4 4 class Utils{ 5 5 6 public function sendSuccess($obj){6 public static function sendSuccess($obj){ 7 7 return [ 8 8 'success' => true, … … 11 11 } 12 12 13 public function sendError($obj){13 public static function sendError($obj){ 14 14 return [ 15 15 'success' => false, … … 17 17 ]; 18 18 } 19 20 public static function encode($data){ 21 return base64_encode( serialize($obj) ); 22 } 23 24 public static function decode($data){ 25 return unserialize( base64_decode($data) ); 26 } 19 27 } 20 28
Note: See TracChangeset
for help on using the changeset viewer.