Spaces:
Sleeping
Sleeping
processmaker-community / processmaker-files /workflow /engine /methods /services /Rest /JsonMessage.php
Download processmaker-files/workflow/engine/methods/services/Rest/JsonMessage.php from kenken999/processmaker-community: direct link, hf CLI and curl.
- Browser
- Download file 947 Bytes
-
https://huggingface.co/spaces/kenken999/processmaker-community/resolve/main/processmaker-files/workflow/engine/methods/services/Rest/JsonMessage.php
- Command line
-
hf download hf://spaces/kenken999/processmaker-community/processmaker-files/workflow/engine/methods/services/Rest/JsonMessage.php
-
curl -L -o JsonMessage.php https://huggingface.co/spaces/kenken999/processmaker-community/resolve/main/processmaker-files/workflow/engine/methods/services/Rest/JsonMessage.php
947 Bytes
| /** | |
| * Class defined to be instanced and handle Json messages. | |
| * | |
| * | |
| * @category Zend | |
| * @package ProcessMaker | |
| * @subpackage workflow | |
| * @copyright Copyright (c) ProcessMaker Colosa Inc. | |
| * @version Release: @2.0.44@ | |
| * @since Class available since Release 2.0.44 | |
| */ | |
| require_once ("FormatedMessage.php"); | |
| /** | |
| * Class defined to be instanced and handle Json messages | |
| */ | |
| class JsonMessage extends FormatedMessage | |
| { | |
| /** | |
| * Call the parent Curl initialization and set the type of the message | |
| */ | |
| public function JsonMessage () | |
| { | |
| parent::__construct(); | |
| $this->type = "json"; | |
| } | |
| /** | |
| * Format the array parameter to a json format. | |
| */ | |
| protected function format (array $message) | |
| { | |
| if (empty( $message )) { | |
| return; | |
| } | |
| if (is_array( $message )) { | |
| $jsonMessage = json_encode( $message ); | |
| } | |
| return $jsonMessage; | |
| } | |
| } | |