ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
|
This class provides methods for building a DB generation script, getting a full overview on abstract table definitions and more... More...
Public Member Functions | |
__construct () | |
Constructor. More... | |
setTargetEncoding (string $a_encoding) | |
Set the desired target encoding If the target encoding os different from UTF-8 all text values will be shortened to length of of the current text field E.g: il_meta_keyword keyword(4000) target encoding: UTF16 => $value = mb_convert_encoding($value,'UTF-8','UTF-16'); $value = mb_strcut($value,0,4000,'UTF16'); $value = mb_convert_encoding($value,'UTF-16','UTF-8'); More... | |
getTargetEncoding () | |
setBlackList (array $a_blacklist) | |
Set Table Black List. More... | |
getBlackList () | |
setWhiteList (array $a_whitelist) | |
Set Table White List. More... | |
getWhiteList () | |
setFilter (string $a_filter, string $a_value) | |
getTables () | |
checkProcessing (string $a_table) | |
Check whether a table should be processed or not. More... | |
buildDBGenerationScript (string $a_filename="") | |
Build DB generation script. More... | |
buildCreateTableStatement (string $a_table, $a_file=null) | |
buildAddPrimaryKeyStatement (string $a_table, $a_file=null) | |
buildAddIndexStatements (string $a_table, $a_file=null) | |
buildAddUniqueConstraintStatements (string $a_table, $file_handle=null) | |
buildCreateSequenceStatement (string $a_table, $file_handle=null) | |
buildSingularSequenceStatement ($file_handle=null) | |
buildInsertStatement (string $a_table, string $a_basedir) | |
Write seerialized insert data to array. More... | |
buildInsertStatements (string $a_table, $file_handle=null) | |
Static Public Member Functions | |
static | lookupAbstractedTables () |
Protected Member Functions | |
openFile (string $a_path) | |
closeFile ($fp) | |
shortenText (string $table, string $field, string $a_value, int $a_size) | |
Shorten text depending on target encoding. More... | |
Protected Attributes | |
string | $target_encoding = 'UTF-8' |
array | $whitelist = [] |
array | $blacklist = [] |
array | $tables = [] |
array | $filter = [] |
ilDBManager | $manager |
ilDBReverse | $reverse |
ilDBInterface | $il_db |
ilDBAnalyzer | $analyzer |
array | $allowed_attributes = [] |
array | $fields = [] |
Private Member Functions | |
printOrWrite (string $string, $file_handle=null) | |
This class provides methods for building a DB generation script, getting a full overview on abstract table definitions and more...
Definition at line 28 of file class.ilDBGenerator.php.
ilDBGenerator::__construct | ( | ) |
Constructor.
Definition at line 45 of file class.ilDBGenerator.php.
References $DIC, $ilDB, ilDBConstants\MODULE_MANAGER, and ilDBConstants\MODULE_REVERSE.
ilDBGenerator::buildAddIndexStatements | ( | string | $a_table, |
$a_file = null |
|||
) |
resource | $a_file |
Definition at line 390 of file class.ilDBGenerator.php.
References Vendor\Package\$f, and null.
Referenced by buildDBGenerationScript().
ilDBGenerator::buildAddPrimaryKeyStatement | ( | string | $a_table, |
$a_file = null |
|||
) |
resource | $a_file |
Definition at line 365 of file class.ilDBGenerator.php.
References Vendor\Package\$f, and null.
Referenced by buildDBGenerationScript().
ilDBGenerator::buildAddUniqueConstraintStatements | ( | string | $a_table, |
$file_handle = null |
|||
) |
resource | $file_handle |
Definition at line 430 of file class.ilDBGenerator.php.
References Vendor\Package\$f, and printOrWrite().
Referenced by buildDBGenerationScript().
ilDBGenerator::buildCreateSequenceStatement | ( | string | $a_table, |
$file_handle = null |
|||
) |
resource | $file_handle |
ilDatabaseException |
Definition at line 454 of file class.ilDBGenerator.php.
References ILIAS\Repository\int(), and printOrWrite().
Referenced by buildDBGenerationScript().
ilDBGenerator::buildCreateTableStatement | ( | string | $a_table, |
$a_file = null |
|||
) |
string | $a_table | |
resource | $a_file |
ilDatabaseException |
Definition at line 318 of file class.ilDBGenerator.php.
References Vendor\Package\$f, $fields, and null.
Referenced by buildDBGenerationScript().
ilDBGenerator::buildDBGenerationScript | ( | string | $a_filename = "" | ) |
Build DB generation script.
string | output filename, if no filename is given, script is echoed |
Definition at line 234 of file class.ilDBGenerator.php.
References $path, buildAddIndexStatements(), buildAddPrimaryKeyStatement(), buildAddUniqueConstraintStatements(), buildCreateSequenceStatement(), buildCreateTableStatement(), buildInsertStatement(), buildInsertStatements(), buildSingularSequenceStatement(), checkProcessing(), closeFile(), getTables(), and openFile().
ilDBGenerator::buildInsertStatement | ( | string | $a_table, |
string | $a_basedir | ||
) |
Write seerialized insert data to array.
Definition at line 488 of file class.ilDBGenerator.php.
References $DIC, Vendor\Package\$f, and shortenText().
Referenced by buildDBGenerationScript().
ilDBGenerator::buildInsertStatements | ( | string | $a_table, |
$file_handle = null |
|||
) |
resource | $file_handle |
Definition at line 549 of file class.ilDBGenerator.php.
References Vendor\Package\$f, and printOrWrite().
Referenced by buildDBGenerationScript().
ilDBGenerator::buildSingularSequenceStatement | ( | $file_handle = null | ) |
resource | $file_handle |
Definition at line 467 of file class.ilDBGenerator.php.
References $r, and printOrWrite().
Referenced by buildDBGenerationScript().
ilDBGenerator::checkProcessing | ( | string | $a_table | ) |
Check whether a table should be processed or not.
Definition at line 199 of file class.ilDBGenerator.php.
Referenced by buildDBGenerationScript().
|
protected |
resource | $fp |
Definition at line 225 of file class.ilDBGenerator.php.
Referenced by buildDBGenerationScript().
ilDBGenerator::getBlackList | ( | ) |
ilDBGenerator::getTables | ( | ) |
Definition at line 191 of file class.ilDBGenerator.php.
Referenced by buildDBGenerationScript().
ilDBGenerator::getTargetEncoding | ( | ) |
Definition at line 147 of file class.ilDBGenerator.php.
References $target_encoding.
Referenced by shortenText().
ilDBGenerator::getWhiteList | ( | ) |
|
static |
Definition at line 61 of file class.ilDBGenerator.php.
References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.
|
protected |
Definition at line 212 of file class.ilDBGenerator.php.
Referenced by buildDBGenerationScript().
|
private |
resource | $file_handle |
Definition at line 418 of file class.ilDBGenerator.php.
References null.
Referenced by buildAddUniqueConstraintStatements(), buildCreateSequenceStatement(), buildInsertStatements(), and buildSingularSequenceStatement().
ilDBGenerator::setBlackList | ( | array | $a_blacklist | ) |
Set Table Black List.
(Tables that should not be included in the processing)
string[] | $a_blacklist Table Black List |
Definition at line 157 of file class.ilDBGenerator.php.
ilDBGenerator::setFilter | ( | string | $a_filter, |
string | $a_value | ||
) |
Definition at line 183 of file class.ilDBGenerator.php.
References ILIAS\Repository\filter().
ilDBGenerator::setTargetEncoding | ( | string | $a_encoding | ) |
Set the desired target encoding If the target encoding os different from UTF-8 all text values will be shortened to length of of the current text field E.g: il_meta_keyword keyword(4000) target encoding: UTF16 => $value = mb_convert_encoding($value,'UTF-8','UTF-16'); $value = mb_strcut($value,0,4000,'UTF16'); $value = mb_convert_encoding($value,'UTF-16','UTF-8');
Definition at line 142 of file class.ilDBGenerator.php.
ilDBGenerator::setWhiteList | ( | array | $a_whitelist | ) |
Set Table White List.
Per default all tables are included in the processing. If a white list ist provided, only them will be used.
string[] | $a_whitelist Table White List |
Definition at line 173 of file class.ilDBGenerator.php.
|
protected |
Shorten text depending on target encoding.
Definition at line 581 of file class.ilDBGenerator.php.
References $DIC, getTargetEncoding(), and ilStr\shortenText().
Referenced by buildInsertStatement().
|
protected |
Definition at line 39 of file class.ilDBGenerator.php.
|
protected |
Definition at line 38 of file class.ilDBGenerator.php.
|
protected |
Definition at line 32 of file class.ilDBGenerator.php.
Referenced by getBlackList().
|
protected |
Definition at line 40 of file class.ilDBGenerator.php.
Referenced by buildCreateTableStatement().
|
protected |
Definition at line 34 of file class.ilDBGenerator.php.
|
protected |
Definition at line 37 of file class.ilDBGenerator.php.
|
protected |
Definition at line 35 of file class.ilDBGenerator.php.
|
protected |
Definition at line 36 of file class.ilDBGenerator.php.
|
protected |
Definition at line 33 of file class.ilDBGenerator.php.
|
protected |
Definition at line 30 of file class.ilDBGenerator.php.
Referenced by getTargetEncoding().
|
protected |
Definition at line 31 of file class.ilDBGenerator.php.
Referenced by getWhiteList().