◆ getDefaultEngine()
  
  
      
        
          | ilDatabasePopulatedObjective::getDefaultEngine  | 
          ( | 
          ilDBInterface  | 
          $db | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ getHash()
      
        
          | ilDatabasePopulatedObjective::getHash  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getLabel()
      
        
          | ilDatabasePopulatedObjective::getLabel  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getPreconditions()
      
        
          | ilDatabasePopulatedObjective::getPreconditions  | 
          ( | 
          Setup\Environment  | 
          $environment | ) | 
           | 
        
      
 
 
◆ isApplicable()
      
        
          | ilDatabasePopulatedObjective::isApplicable  | 
          ( | 
          Setup\Environment  | 
          $environment | ) | 
           | 
        
      
 
 
◆ isDatabasePopulated()
  
  
      
        
          | ilDatabasePopulatedObjective::isDatabasePopulated  | 
          ( | 
          ilDBInterface  | 
          $db | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 112 of file class.ilDatabasePopulatedObjective.php.
References ilDBInterface\listTables().
Referenced by isApplicable().
  114         $probe_tables = [
'usr_data', 
'object_data', 
'object_reference'];
   115         $number_of_probe_tables = count($probe_tables);
   117         $number_of_tables = count($tables);
   120             $number_of_tables > self::MIN_NUMBER_OF_ILIAS_TABLES
   121             && count(array_intersect($tables, $probe_tables)) === $number_of_probe_tables;
 
 
 
 
◆ isNotable()
      
        
          | ilDatabasePopulatedObjective::isNotable  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ queryReader()
  
  
      
        
          | ilDatabasePopulatedObjective::queryReader  | 
          ( | 
          string  | 
          $path_to_db_dump | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 149 of file class.ilDatabasePopulatedObjective.php.
Referenced by readDumpFile().
  152         $handle = fopen($path_to_db_dump, 
"r");
   153         while (($line = fgets($handle)) !== 
false) {
   154             if (preg_match(
'/^--/', $line)) { 
   157             if (preg_match(
'/^\/\*/', $line)) { 
   162             if (!preg_match(
'/;$/', trim($line))) { 
 
 
 
 
◆ readDumpFile()
- Exceptions
 - 
  
  
 
Definition at line 127 of file class.ilDatabasePopulatedObjective.php.
References Vendor\Package\$e, ilDBInterface\execute(), ilDBInterface\prepareManip(), and queryReader().
Referenced by getPreconditions().
  129         $path_to_db_dump = $this->config->getPathToDBDump();
   130         if (!is_file(realpath($path_to_db_dump) ?: 
'') ||
   131             !is_readable(realpath($path_to_db_dump) ?: 
'')) {
   132             throw new Setup\UnachievableException(
   133                 "Cannot read database dump file: $path_to_db_dump"   136         foreach ($this->
queryReader(realpath($path_to_db_dump)) as $query) {
   141                 throw new Setup\UnachievableException(
   142                     "Cannot populate database with dump file: $path_to_db_dump. Query failed: $query wih message " . $e->getMessage(
 queryReader(string $path_to_db_dump)
 
execute(ilDBStatement $stmt, array $data=[])
 
prepareManip(string $a_query, ?array $a_types=null)
 
 
 
 
◆ setDefaultEngine()
  
  
      
        
          | ilDatabasePopulatedObjective::setDefaultEngine  | 
          ( | 
          ilDBInterface  | 
          $db | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ MIN_NUMBER_OF_ILIAS_TABLES
      
        
          | const ilDatabasePopulatedObjective::MIN_NUMBER_OF_ILIAS_TABLES = 200 | 
        
      
 
 
The documentation for this class was generated from the following file: