예제 #1
0
 /**
  * Set the status of the running backup
  *
  * @param string $message
  *
  * @return null
  */
 public function set_status($message)
 {
     $status = json_encode((object) array('filename' => $this->backup->get_archive_filename(), 'started' => $this->get_schedule_running_start_time(), 'status' => $message));
     if (false === @file_put_contents($this->get_schedule_running_path(), $status)) {
         throw new \RuntimeException(sprintf(__('Error writing to file. (%s)', 'backpwordpress'), $this->get_schedule_running_path()));
     }
 }