◆ achieve()
ilDatabasePopulatedObjective::achieve |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 41 of file class.ilDatabasePopulatedObjective.php.
References ILIAS\Setup\Environment\getResource(), and isDatabasePopulated().
43 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
49 $path_to_db_dump = $this->config->getPathToDBDump();
50 if (!is_file(realpath($path_to_db_dump)) ||
51 !is_readable(realpath($path_to_db_dump))) {
52 throw new Setup\UnachievableException(
53 "Cannot read database dump file: $path_to_db_dump" 57 $sql = file_get_contents(realpath($path_to_db_dump));
58 $statement = $db->prepareManip($sql);
59 $db->execute($statement);
isDatabasePopulated(\ilDBInterface $db)
◆ getHash()
ilDatabasePopulatedObjective::getHash |
( |
| ) |
|
◆ getLabel()
ilDatabasePopulatedObjective::getLabel |
( |
| ) |
|
◆ getPreconditions()
ilDatabasePopulatedObjective::getPreconditions |
( |
Setup\Environment |
$environment | ) |
|
◆ isDatabasePopulated()
ilDatabasePopulatedObjective::isDatabasePopulated |
( |
\ilDBInterface |
$db | ) |
|
|
protected |
Definition at line 64 of file class.ilDatabasePopulatedObjective.php.
References ilDBInterface\listTables().
Referenced by achieve().
66 $probe_tables = [
'usr_data',
'object_data',
'object_reference'];
67 $number_of_probe_tables = count($probe_tables);
68 $tables = $db->listTables();
69 $number_of_tables = count($tables);
72 $number_of_tables > self::MIN_NUMBER_OF_ILIAS_TABLES
73 && count(array_intersect($tables, $probe_tables)) == $number_of_probe_tables;
◆ isNotable()
ilDatabasePopulatedObjective::isNotable |
( |
| ) |
|
◆ MIN_NUMBER_OF_ILIAS_TABLES
const ilDatabasePopulatedObjective::MIN_NUMBER_OF_ILIAS_TABLES = 200 |
The documentation for this class was generated from the following file: