コード例 #1
0
 public function save_controller()
 {
     // Going to save controller to persistent storage, calculate checksum for later checks and save it
     // TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
     $this->log('saving controller to db', backup::LOG_DEBUG);
     $this->checksum = $this->calculate_checksum();
     restore_controller_dbops::save_controller($this, $this->checksum);
 }
コード例 #2
0
 /**
  * Save controller information
  *
  * @param bool $includeobj to decide if the object itself must be updated (true) or no (false)
  * @param bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
  */
 public function save_controller($includeobj = true, $cleanobj = false)
 {
     // Going to save controller to persistent storage, calculate checksum for later checks and save it
     // TODO: flag the controller as NA. Any operation on it should be forbidden util loaded back
     $this->log('saving controller to db', backup::LOG_DEBUG);
     if ($includeobj) {
         // Only calculate checksum if we are going to include the object.
         $this->checksum = $this->calculate_checksum();
     }
     restore_controller_dbops::save_controller($this, $this->checksum, $includeobj, $cleanobj);
 }