◆ 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 81 of file class.ilDatabasePopulatedObjective.php.
References ilDBInterface\listTables().
Referenced by isApplicable().
83 $probe_tables = [
'usr_data',
'object_data',
'object_reference'];
84 $number_of_probe_tables = count($probe_tables);
86 $number_of_tables = count($tables);
89 $number_of_tables > self::MIN_NUMBER_OF_ILIAS_TABLES
90 && 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 119 of file class.ilDatabasePopulatedObjective.php.
Referenced by readDumpFile().
122 $handle = fopen($path_to_db_dump,
"r");
123 while (($line = fgets($handle)) !==
false) {
124 if (preg_match(
'/^--/', $line)) {
127 if (preg_match(
'/^\/\*/', $line)) {
132 if (!preg_match(
'/;$/', trim($line))) {
◆ readDumpFile()
- Parameters
-
- Exceptions
-
Definition at line 97 of file class.ilDatabasePopulatedObjective.php.
References Vendor\Package\$e, $query, ilDBInterface\execute(), ilDBInterface\prepareManip(), and queryReader().
Referenced by getPreconditions().
99 $path_to_db_dump = $this->config->getPathToDBDump();
100 if (!is_file(realpath($path_to_db_dump)) ||
101 !is_readable(realpath($path_to_db_dump))) {
102 throw new Setup\UnachievableException(
103 "Cannot read database dump file: $path_to_db_dump" 111 throw new Setup\UnachievableException(
112 "Cannot populate database with dump file: $path_to_db_dump. Query failed: $query wih message " . $e->getMessage(
prepareManip($a_query, $a_types=null)
execute($stmt, $data=array())
queryReader(string $path_to_db_dump)
◆ 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: