You are here

private function RestProcessor::restStatus in Radioactivity 4.0.x

Same name and namespace in other branches
  1. 8.3 src/RestProcessor.php \Drupal\radioactivity\RestProcessor::restStatus()

Returns status and message.

Parameters

string $status: The status code (ok, error).

string $message: The message describing the status.

3 calls to RestProcessor::restStatus()
RestProcessor::clearData in src/RestProcessor.php
Clears the rest data storage.
RestProcessor::error in src/RestProcessor.php
Returns a generic error message.
RestProcessor::processData in src/RestProcessor.php
Processes incoming radioactivity incident data.

File

src/RestProcessor.php, line 137

Class

RestProcessor
The worker class for the Radioactivity rest endpoint.

Namespace

Drupal\radioactivity

Code

private function restStatus($status, $message) {
  return json_encode([
    'status' => $status,
    'message' => $message,
  ]);
}