You are here

public function RestProcessor::clearData in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x src/RestProcessor.php \Drupal\radioactivity\RestProcessor::clearData()

Clears the rest data storage.

Return value

string Json formatted result status message.

File

src/RestProcessor.php, line 70

Class

RestProcessor
The worker class for the Radioactivity rest endpoint.

Namespace

Drupal\radioactivity

Code

public function clearData() {
  if (file_exists($this->payloadFile)) {
    unlink($this->payloadFile);
  }
  return $this
    ->restStatus('ok', 'Cleared.');
}