Last active
December 18, 2015 21:59
-
-
Save anderprc/5851260 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**/ | |
$return = new \stdClass(); | |
// Add some test data | |
$return->status = true; | |
$return->success = new \stdClass(); | |
$return->success->id = 1988; | |
$return->success->msg = "Message"; | |
$return->success->data = new \stdClass(); | |
$return->error = new \stdClass(); | |
$return->error->code = 1988; | |
$return->error->msg = "An error occurred!"; | |
$return->error->msgHid = "An error occurred in action xxx!"; | |
$return->error->redirect = "/route"; | |
/** | |
stdClass Object | |
( | |
[status] => true|false | |
[success] => stdClass Object | |
( | |
[id[Table/opc]] => 19880803 | |
[id[Table2/opc]] => 19880430 | |
[msg] => "Message" | |
[data] => string|stdClass Object | |
( | |
[var1] => "for example" | |
) | |
) | |
[false] => stdClass Object | |
( | |
[code] => -1|0|1|2 | |
[msg] => "An error occurred!" | |
[msgHid] => "An error occurred in action xxx!" | |
[redirect] => "/route" | |
) | |
) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment