Database Update class.  
 More...
◆ __construct()
◆ applyUpdate()
      
        
          | ilPluginDBUpdate::applyUpdate  | 
          ( | 
           | ) | 
           | 
        
      
 
Apply update. 
- Returns
 - false|void 
 
Definition at line 128 of file class.ilPluginDBUpdate.php.
References $current_version, $file_version, $ilDB, ilDBUpdate\applyUpdateNr(), and ilDBUpdate\initGlobalsRequiredForUpdateSteps().
  130         $ilCtrlStructureReader = null;
   137         $this->updateMsg = 
'no_changes';
   142                     $msg[] = 
'msg: update_error - ' . $this->error . 
'; nr: ' . $i . 
';';
   143                     $this->updateMsg = implode(
"\n", $msg);
   148                 $msg[] = 
'msg: update_applied; nr: ' . $i . 
';';
   151             $this->updateMsg = implode(
'\n', $msg);
 
applyUpdateNr(int $nr, bool $custom_update=false)
Apply a custom database update or a plugin update. 
 
initGlobalsRequiredForUpdateSteps(?ilCtrlStructureReader &$ilCtrlStructureReader, ?ilDBInterface &$ilDB)
 
 
 
 
◆ checkQuery()
  
  
      
        
          | ilPluginDBUpdate::checkQuery  | 
          ( | 
          string  | 
          $q | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ getCurrentVersion()
      
        
          | ilPluginDBUpdate::getCurrentVersion  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getDBUpdateScriptName()
  
  
      
        
          | ilPluginDBUpdate::getDBUpdateScriptName  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ getTablePrefix()
  
  
      
        
          | ilPluginDBUpdate::getTablePrefix  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 112 of file class.ilPluginDBUpdate.php.
Referenced by checkQuery().
  114         $component = $this->plugin->getComponent();
   115         $slot = $this->plugin->getPluginSlot();
   116         return $component->getId() . 
'_' . $slot->getId() . 
'_' . $this->plugin->getId();
  
 
 
◆ readDBUpdateFile()
  
  
      
        
          | ilPluginDBUpdate::readDBUpdateFile  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 65 of file class.ilPluginDBUpdate.php.
Referenced by __construct().
   67         if (!file_exists($this->db_update_file)) {
    68             $this->error = 
'no_db_update_file';
    69             $this->filecontent = [];
    73         $this->filecontent = @file($this->db_update_file);
  
 
 
◆ readFileVersion()
  
  
      
        
          | ilPluginDBUpdate::readFileVersion  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ setCurrentVersion()
  
  
      
        
          | ilPluginDBUpdate::setCurrentVersion  | 
          ( | 
          ?int  | 
          $a_version | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ $current_version
  
  
      
        
          | int ilPluginDBUpdate::$current_version | 
         
       
   | 
  
private   | 
  
 
 
◆ $db_update_file
  
  
      
        
          | string ilPluginDBUpdate::$db_update_file | 
         
       
   | 
  
private   | 
  
 
 
◆ $error
  
  
      
        
          | string ilPluginDBUpdate::$error = '' | 
         
       
   | 
  
protected   | 
  
 
 
◆ $file_version
  
  
      
        
          | int ilPluginDBUpdate::$file_version = null | 
         
       
   | 
  
private   | 
  
 
 
◆ $plugin
◆ PLUGIN_UPDATE_FILE
  
  
      
        
          | const ilPluginDBUpdate::PLUGIN_UPDATE_FILE = "/sql/dbupdate.php" | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: