This class provides methods for building a DB generation script, getting a full overview on abstract table definitions and more...
More...
|
| __construct () |
| Constructor. More...
|
|
| setTargetEncoding ($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. More...
|
|
| getTargetEncoding () |
| Returns the target encoding. More...
|
|
| setBlackList ($a_blacklist) |
| Set Table Black List. More...
|
|
| getBlackList () |
| Get Table Black List. More...
|
|
| setWhiteList ($a_whitelist) |
| Set Table White List. More...
|
|
| getWhiteList () |
| Get Table White List. More...
|
|
| setFilter ($a_filter, $a_value) |
|
| getTables () |
|
| checkProcessing ($a_table) |
| Check whether a table should be processed or not. More...
|
|
| buildDBGenerationScript ($a_filename="") |
| Build DB generation script. More...
|
|
| buildCreateTableStatement ($a_table, $a_file="") |
| Build CreateTable statement. More...
|
|
| buildAddPrimaryKeyStatement ($a_table, $a_file="") |
| Build AddPrimaryKey statement. More...
|
|
| buildAddIndexStatements ($a_table, $a_file="") |
| Build AddIndex statements. More...
|
|
| buildAddUniqueConstraintStatements ($a_table, $a_file="") |
| Build AddUniqueConstraint statements. More...
|
|
| buildCreateSequenceStatement ($a_table, $a_file="") |
| Build CreateSequence statement. More...
|
|
| buildSingularSequenceStatement ($a_file="") |
| Build CreateSequence statement (if not belonging to table) More...
|
|
| buildInsertStatement ($a_table, $a_basedir) |
| Write seerialized insert data to array. More...
|
|
| buildInsertStatementsXML ($a_table, $a_basedir) |
|
| buildInsertStatements ($a_table, $a_file="") |
| Build Insert statements. More...
|
|
| getHTMLOverview ($a_filename="") |
| Get table definition overview in HTML. More...
|
|
| addTableToOverview ($a_table, $a_tpl, $a_cnt) |
| Add table to overview template. More...
|
|
This class provides methods for building a DB generation script, getting a full overview on abstract table definitions and more...
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- Id
- class.ilDBUpdate.php 18649 2009-01-21 09:59:23Z akill
Definition at line 13 of file class.ilDBGenerator.php.
◆ __construct()
ilDBGenerator::__construct |
( |
| ) |
|
◆ addTableToOverview()
ilDBGenerator::addTableToOverview |
( |
|
$a_table, |
|
|
|
$a_tpl, |
|
|
|
$a_cnt |
|
) |
| |
Add table to overview template.
Definition at line 753 of file class.ilDBGenerator.php.
References $def, $f, and $index.
Referenced by getHTMLOverview().
755 $fields = $this->analyzer->getFieldInformation($a_table);
756 $indices = $this->analyzer->getIndicesInformation($a_table);
757 $constraints = $this->analyzer->getConstraintsInformation($a_table);
758 $pk = $this->analyzer->getPrimaryKeyInformation($a_table);
759 $auto = $this->analyzer->getAutoIncrementField($a_table);
760 $has_sequence = $this->analyzer->hasSequence($a_table);
763 if (isset($this->filter[
"has_sequence"])) {
764 if ((!$has_sequence && $auto ==
"" && $this->filter[
"has_sequence"])
765 || (($has_sequence || $auto !=
"") && !$this->filter[
"has_sequence"])
772 $indices_output =
false;
773 if (is_array($indices) && count($indices) > 0 && !$this->filter[
"skip_indices"]) {
776 foreach (
$def[
"fields"] as
$f => $pos) {
779 $a_tpl->setCurrentBlock(
"index");
780 $a_tpl->setVariable(
"VAL_INDEX",
$def[
"name"]);
781 $a_tpl->setVariable(
"VAL_FIELDS", implode(
", ", $f2));
782 $a_tpl->parseCurrentBlock();
783 $indices_output =
true;
785 $a_tpl->setCurrentBlock(
"index_table");
786 $a_tpl->parseCurrentBlock();
790 $constraints_output =
false;
791 if (is_array($constraints) && count($constraints) > 0 && !$this->filter[
"skip_constraints"]) {
794 foreach (
$def[
"fields"] as
$f => $pos) {
797 $a_tpl->setCurrentBlock(
"constraint");
798 $a_tpl->setVariable(
"VAL_CONSTRAINT",
$def[
"name"]);
799 $a_tpl->setVariable(
"VAL_CTYPE",
$def[
"type"]);
800 $a_tpl->setVariable(
"VAL_CFIELDS", implode(
", ", $f2));
801 $a_tpl->parseCurrentBlock();
802 $constraints_output =
true;
804 $a_tpl->setCurrentBlock(
"constraint_table");
805 $a_tpl->parseCurrentBlock();
809 $fields_output =
false;
810 foreach ($fields as $field =>
$def) {
812 if (isset($this->filter[
"alt_types"])) {
813 if ((
$def[
"alt_types"] ==
"" && $this->filter[
"alt_types"])
814 || (
$def[
"alt_types"] !=
"" && !$this->filter[
"alt_types"])
819 if (isset($this->filter[
"type"])) {
820 if (
$def[
"type"] != $this->filter[
"type"]) {
824 if (isset($this->filter[
"nativetype"])) {
825 if (
$def[
"nativetype"] != $this->filter[
"nativetype"]) {
829 if (isset($this->filter[
"unsigned"])) {
830 if (
$def[
"unsigned"] != $this->filter[
"unsigned"]) {
835 $a_tpl->setCurrentBlock(
"field");
836 if (empty($pk[
"fields"][$field])) {
837 $a_tpl->setVariable(
"VAL_FIELD", strtolower($field));
839 $a_tpl->setVariable(
"VAL_FIELD",
"<u>" . strtolower($field) .
"</u>");
841 $a_tpl->setVariable(
"VAL_TYPE",
$def[
"type"]);
842 $a_tpl->setVariable(
"VAL_LENGTH", (!is_null(
$def[
"length"])) ?
$def[
"length"] :
" ");
844 if (strtolower($def[
"default"]) ==
"current_timestamp") {
846 unset($def[
"default"]);
849 $a_tpl->setVariable(
"VAL_DEFAULT", (!is_null($def[
"default"])) ? $def[
"default"] :
" ");
850 $a_tpl->setVariable(
"VAL_NOT_NULL", (!is_null($def[
"notnull"])) ? (($def[
"notnull"]) ?
"true" :
"false") :
" ");
851 $a_tpl->setVariable(
"VAL_FIXED", (!is_null($def[
"fixed"])) ? (($def[
"fixed"]) ?
"true" :
"false") :
" ");
852 $a_tpl->setVariable(
"VAL_UNSIGNED", (!is_null($def[
"unsigned"])) ? (($def[
"unsigned"]) ?
"true" :
"false") :
" ");
853 $a_tpl->setVariable(
"VAL_ALTERNATIVE_TYPES", ($def[
"alt_types"] !=
"") ? $def[
"alt_types"] :
" ");
854 $a_tpl->setVariable(
"VAL_NATIVETYPE", ($def[
"nativetype"] !=
"") ? $def[
"nativetype"] :
" ");
855 $a_tpl->parseCurrentBlock();
856 $fields_output =
true;
859 if ($fields_output) {
860 $a_tpl->setCurrentBlock(
"field_table");
861 $a_tpl->parseCurrentBlock();
865 if ($indices_output || $fields_output || $constraints_output) {
866 $a_tpl->setCurrentBlock(
"table");
867 $a_tpl->setVariable(
"TXT_TABLE_NAME", strtolower($a_table));
868 if ($has_sequence || $auto !=
"") {
869 $a_tpl->setVariable(
"TXT_SEQUENCE",
"Has Sequence");
871 $a_tpl->setVariable(
"TXT_SEQUENCE",
"No Sequence");
873 $a_tpl->setVariable(
"VAL_CNT", (
int) $a_cnt);
874 $a_tpl->parseCurrentBlock();
◆ buildAddIndexStatements()
ilDBGenerator::buildAddIndexStatements |
( |
|
$a_table, |
|
|
|
$a_file = "" |
|
) |
| |
Build AddIndex statements.
- Parameters
-
string | table name |
file | file resource or empty string |
Definition at line 464 of file class.ilDBGenerator.php.
References $f, and $i.
Referenced by buildDBGenerationScript().
466 $ind = $this->analyzer->getIndicesInformation($a_table,
true);
468 if (is_array($ind)) {
469 foreach ($ind as
$i) {
470 if ($i[
"fulltext"]) {
475 $in_st =
"\n" .
'$in_fields = array(';
477 foreach ($i[
"fields"] as
$f => $pos) {
478 $in_st .= $sep .
'"' .
$f .
'"';
482 $in_st .=
'$ilDB->addIndex("' . $a_table .
'", $in_fields, "' . $i[
"name"] .
'"' . $ft .
');' .
"\n";
487 fwrite($a_file, $in_st);
◆ buildAddPrimaryKeyStatement()
ilDBGenerator::buildAddPrimaryKeyStatement |
( |
|
$a_table, |
|
|
|
$a_file = "" |
|
) |
| |
Build AddPrimaryKey statement.
- Parameters
-
string | table name |
file | file resource or empty string |
Definition at line 435 of file class.ilDBGenerator.php.
References $f.
Referenced by buildDBGenerationScript().
437 $pk = $this->analyzer->getPrimaryKeyInformation($a_table);
439 if (is_array($pk[
"fields"]) && count($pk[
"fields"]) > 0) {
440 $pk_st =
"\n" .
'$pk_fields = array(';
442 foreach ($pk[
"fields"] as
$f => $pos) {
443 $pk_st .= $sep .
'"' .
$f .
'"';
447 $pk_st .=
'$ilDB->addPrimaryKey("' . $a_table .
'", $pk_fields);' .
"\n";
452 fwrite($a_file, $pk_st);
◆ buildAddUniqueConstraintStatements()
ilDBGenerator::buildAddUniqueConstraintStatements |
( |
|
$a_table, |
|
|
|
$a_file = "" |
|
) |
| |
Build AddUniqueConstraint statements.
- Parameters
-
string | table name |
file | file resource or empty string |
Definition at line 500 of file class.ilDBGenerator.php.
References $f, and $i.
Referenced by buildDBGenerationScript().
502 $con = $this->analyzer->getConstraintsInformation($a_table,
true);
504 if (is_array($con)) {
505 foreach ($con as
$i) {
506 $in_st =
"\n" .
'$in_fields = array(';
508 foreach ($i[
"fields"] as
$f => $pos) {
509 $in_st .= $sep .
'"' .
$f .
'"';
513 $in_st .=
'$ilDB->addUniqueConstraint("' . $a_table .
'", $in_fields, "' . $i[
"name"] .
'");' .
"\n";
518 fwrite($a_file, $in_st);
◆ buildCreateSequenceStatement()
ilDBGenerator::buildCreateSequenceStatement |
( |
|
$a_table, |
|
|
|
$a_file = "" |
|
) |
| |
Build CreateSequence statement.
- Parameters
-
string | table name |
file | file resource or empty string |
Definition at line 531 of file class.ilDBGenerator.php.
Referenced by buildDBGenerationScript().
533 $seq = $this->analyzer->hasSequence($a_table);
534 if ($seq !==
false) {
535 $seq_st =
"\n" .
'$ilDB->createSequence("' . $a_table .
'", ' . (int) $seq .
');' .
"\n";
540 fwrite($a_file, $seq_st);
◆ buildCreateTableStatement()
ilDBGenerator::buildCreateTableStatement |
( |
|
$a_table, |
|
|
|
$a_file = "" |
|
) |
| |
Build CreateTable statement.
- Parameters
-
string | table name |
file | file resource or empty string |
Definition at line 384 of file class.ilDBGenerator.php.
References $def, $f, and fields.
Referenced by buildDBGenerationScript().
386 $fields = $this->analyzer->getFieldInformation($a_table,
true);
388 $create_st =
"\n\n//\n// " . $a_table .
"\n//\n";
389 $create_st .=
'$fields = array (' .
"\n";
391 foreach ($fields as
$f =>
$def) {
392 $create_st .=
"\t" . $f_sep .
'"' .
$f .
'" => array (' .
"\n";
395 foreach (
$def as $k => $v) {
396 if ($k !=
"nativetype" && $k !=
"alt_types" && $k !=
"autoincrement" && !is_null($v)) {
401 $v = $v ?
"true" :
"false";
412 $create_st .=
"\t\t" . $a_sep .
'"' . $k .
'" => ' . $v .
"\n";
416 $create_st .=
"\t" .
')' .
"\n";
418 $create_st .=
');' .
"\n";
419 $create_st .=
'$ilDB->createTable("' . $a_table .
'", $fields);' .
"\n";
424 fwrite($a_file, $create_st);
◆ buildDBGenerationScript()
ilDBGenerator::buildDBGenerationScript |
( |
|
$a_filename = "" | ) |
|
Build DB generation script.
- Parameters
-
string | output filename, if no filename is given, script is echoed |
Definition at line 291 of file class.ilDBGenerator.php.
References $end, $ok, $path, $start, $table, buildAddIndexStatements(), buildAddPrimaryKeyStatement(), buildAddUniqueConstraintStatements(), buildCreateSequenceStatement(), buildCreateTableStatement(), buildInsertStatement(), buildInsertStatements(), buildSingularSequenceStatement(), checkProcessing(), closeFile(), getTables(), and openFile().
293 if (@is_dir($a_filename)) {
297 $isDirectory =
false;
302 if ($a_filename !=
"" and !$isDirectory) {
303 $file =
fopen($a_filename,
"w");
305 $start =
'<?php' .
"\n" .
'function setupILIASDatabase()' .
"\n{\n";
306 $start .=
"\t" .
'global $ilDB;' .
"\n\n";
308 } elseif ($isDirectory) {
316 foreach ($this->tables as
$table) {
318 if ($a_filename !=
"") {
341 if (in_array($table, array(
'usr_session_stats',
'usr_session_raw'))) {
348 #$this->buildInsertStatementsXML($table,$path); 357 if ($a_filename !=
"") {
358 echo "<br><b>missing: " . $table .
"</b>";
367 if ($a_filename ==
"") {
369 } elseif (!$isDirectory) {
buildAddIndexStatements($a_table, $a_file="")
Build AddIndex statements.
buildInsertStatement($a_table, $a_basedir)
Write seerialized insert data to array.
buildAddPrimaryKeyStatement($a_table, $a_file="")
Build AddPrimaryKey statement.
buildCreateTableStatement($a_table, $a_file="")
Build CreateTable statement.
buildInsertStatements($a_table, $a_file="")
Build Insert statements.
buildSingularSequenceStatement($a_file="")
Build CreateSequence statement (if not belonging to table)
if(empty($password)) $table
checkProcessing($a_table)
Check whether a table should be processed or not.
buildAddUniqueConstraintStatements($a_table, $a_file="")
Build AddUniqueConstraint statements.
buildCreateSequenceStatement($a_table, $a_file="")
Build CreateSequence statement.
◆ buildInsertStatement()
ilDBGenerator::buildInsertStatement |
( |
|
$a_table, |
|
|
|
$a_basedir |
|
) |
| |
Write seerialized insert data to array.
- Parameters
-
object | $a_table | |
object | $a_basedir | |
- Returns
Definition at line 581 of file class.ilDBGenerator.php.
References $DIC, $f, $row, $rows, $values, fields, and shortenText().
Referenced by buildDBGenerationScript().
584 $ilLogger = $DIC->logger()->root();
586 $ilLogger->log(
'Starting export of:' . $a_table);
588 $set = $this->il_db->query(
"SELECT * FROM " . $this->il_db->quoteIdentifier($a_table));
592 mkdir($a_basedir .
'/' . $a_table .
'_inserts', fileperms($a_basedir));
595 while ($rec = $this->il_db->fetchAssoc($set)) {
597 foreach ($rec as
$f => $v) {
611 $ilLogger->log(
'Writing insert statements after 1000 lines...');
612 $fp =
fopen($a_basedir .
'/' . $a_table .
'_inserts/' . $filenum++ .
'.data',
'w');
613 fwrite($fp, serialize((array)
$rows));
621 $fp =
fopen($a_basedir .
'/' . $a_table .
'_inserts/' . $filenum++ .
'.data',
'w');
622 fwrite($fp, serialize((array)
$rows) .
"\n");
626 $ilLogger->log(
'Finished export of: ' . $a_table);
627 if (function_exists(
'memory_get_usage')) {
628 $ilLogger->log(
'Memory usage: ' . memory_get_usage(
true));
shortenText($table, $field, $a_value, $a_size)
Shorten text depending on target encoding.
◆ buildInsertStatements()
ilDBGenerator::buildInsertStatements |
( |
|
$a_table, |
|
|
|
$a_file = "" |
|
) |
| |
Build Insert statements.
- Parameters
-
string | table name |
file | file resource or empty string |
Definition at line 682 of file class.ilDBGenerator.php.
References $f, $values, and fields.
Referenced by buildDBGenerationScript().
684 if ($a_table ==
"lng_data") {
688 $set = $this->il_db->query(
"SELECT * FROM " . $this->il_db->quoteIdentifier($a_table));
691 while ($rec = $this->il_db->fetchAssoc($set)) {
696 foreach ($rec as
$f => $v) {
698 $types[] =
'"' . $this->
fields[
$f][
"type"] .
'"';
699 $v = str_replace(
'\\',
'\\\\', $v);
700 $values[] =
"'" . str_replace(
"'",
"\'", $v) .
"'";
701 $i_str[] =
"'" .
$f .
"' => array('" . $this->
fields[
$f][
"type"] .
"', '" . str_replace(
"'",
"\'", $v) .
"')";
703 $fields_str =
"(" . implode(
",", $fields) .
")";
704 $types_str =
"array(" . implode(
",", $types) .
")";
705 $values_str =
"array(" . implode(
",",
$values) .
")";
706 $ins_st =
"\n" .
'$ilDB->insert("' . $a_table .
'", array(' .
"\n";
707 $ins_st .= implode(
", ", $i_str) .
"));\n";
715 fwrite($a_file, $ins_st);
◆ buildInsertStatementsXML()
ilDBGenerator::buildInsertStatementsXML |
( |
|
$a_table, |
|
|
|
$a_basedir |
|
) |
| |
- Parameters
-
object | $a_table | |
object | $a_file | [optional] |
- Returns
Definition at line 641 of file class.ilDBGenerator.php.
References $f, $values, $w, fields, and shortenText().
643 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
645 $w->xmlStartTag(
'Table', array(
'name' => $a_table ));
647 $set = $this->il_db->query(
"SELECT * FROM " . $this->il_db->quoteIdentifier($a_table));
650 while ($rec = $this->il_db->fetchAssoc($set)) {
651 #$ilLog->write('Num: '.$num++); 652 $w->xmlStartTag(
'Row');
657 foreach ($rec as
$f => $v) {
662 $w->xmlElement(
'Value', array(
664 'type' => $this->
fields[
$f][
'type'],
668 $w->xmlEndTag(
'Row');
670 $w->xmlEndTag(
'Table');
672 $w->xmlDumpFile($a_basedir .
'/' . $a_table .
'.xml',
false);
shortenText($table, $field, $a_value, $a_size)
Shorten text depending on target encoding.
◆ buildSingularSequenceStatement()
ilDBGenerator::buildSingularSequenceStatement |
( |
|
$a_file = "" | ) |
|
Build CreateSequence statement (if not belonging to table)
- Parameters
-
file | file resource or empty string |
Definition at line 551 of file class.ilDBGenerator.php.
References $r.
Referenced by buildDBGenerationScript().
553 $r = $this->manager->listSequences();
555 foreach (
$r as $seq) {
556 if (!in_array($seq, $this->tables)) {
558 if ($seq ==
"sahs_sc13_seq") {
562 $create_st =
"\n" .
'$ilDB->createSequence("' . $seq .
'");' .
"\n";
567 fwrite($a_file, $create_st);
◆ checkProcessing()
ilDBGenerator::checkProcessing |
( |
|
$a_table | ) |
|
◆ closeFile()
ilDBGenerator::closeFile |
( |
|
$fp | ) |
|
|
protected |
◆ getBlackList()
ilDBGenerator::getBlackList |
( |
| ) |
|
◆ getHTMLOverview()
ilDBGenerator::getHTMLOverview |
( |
|
$a_filename = "" | ) |
|
Get table definition overview in HTML.
- Parameters
-
string | output filename, if no filename is given, script is echoed |
Definition at line 727 of file class.ilDBGenerator.php.
References $table, $tpl, addTableToOverview(), checkProcessing(), getTables(), and ILIAS_VERSION.
729 $tpl =
new ilTemplate(
"tpl.db_overview.html",
true,
true,
"Services/Database");
733 foreach ($this->tables as
$table) {
742 $tpl->setVariable(
"TXT_TITLE",
"ILIAS Abstract DB Tables (" .
ILIAS_VERSION .
")");
744 if ($a_filename ==
"") {
addTableToOverview($a_table, $a_tpl, $a_cnt)
Add table to overview template.
special template class to simplify handling of ITX/PEAR
if(empty($password)) $table
checkProcessing($a_table)
Check whether a table should be processed or not.
◆ getTables()
ilDBGenerator::getTables |
( |
| ) |
|
◆ getTargetEncoding()
ilDBGenerator::getTargetEncoding |
( |
| ) |
|
◆ getWhiteList()
ilDBGenerator::getWhiteList |
( |
| ) |
|
◆ lookupAbstractedTables()
static ilDBGenerator::lookupAbstractedTables |
( |
| ) |
|
|
static |
- Returns
- array
- Deprecated:
- abstraction_progress is no longer used in ILIAS
Definition at line 59 of file class.ilDBGenerator.php.
References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
62 $ilDB = $DIC->database();
64 $query =
"SELECT DISTINCT(table_name) FROM abstraction_progress ";
68 $names[] =
$row->table_name;
74 $abs_tables = array_merge($names, array(
76 'acc_user_access_key',
79 'qpl_question_orderinghorizontal',
80 'qpl_question_fileupload',
83 'style_template_class',
87 'page_editor_settings',
102 'qpl_qst_javaapplet',
108 'qpl_qst_textsubset',
foreach($_POST as $key=> $value) $res
◆ openFile()
ilDBGenerator::openFile |
( |
|
$a_path | ) |
|
|
protected |
◆ setBlackList()
ilDBGenerator::setBlackList |
( |
|
$a_blacklist | ) |
|
Set Table Black List.
(Tables that should not be included in the processing)
- Parameters
-
array | $a_blacklist | Table Black List |
Definition at line 170 of file class.ilDBGenerator.php.
172 $this->blacklist = $a_blacklist;
◆ setFilter()
ilDBGenerator::setFilter |
( |
|
$a_filter, |
|
|
|
$a_value |
|
) |
| |
◆ setTargetEncoding()
ilDBGenerator::setTargetEncoding |
( |
|
$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');
- Parameters
-
- Returns
Definition at line 147 of file class.ilDBGenerator.php.
149 $this->target_encoding = $a_encoding;
◆ setWhiteList()
ilDBGenerator::setWhiteList |
( |
|
$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.
- Parameters
-
array | $a_whitelist | Table White List |
Definition at line 194 of file class.ilDBGenerator.php.
196 $this->whitelist = $a_whitelist;
◆ shortenText()
ilDBGenerator::shortenText |
( |
|
$table, |
|
|
|
$field, |
|
|
|
$a_value, |
|
|
|
$a_size |
|
) |
| |
|
protected |
Shorten text depending on target encoding.
- Parameters
-
string | $table | |
string | $field | |
string | $a_value | |
int | $a_size | |
- Returns
- string
Definition at line 892 of file class.ilDBGenerator.php.
References $DIC, $table, fields, getTargetEncoding(), and ilStr\shortenText().
Referenced by buildInsertStatement(), and buildInsertStatementsXML().
895 $ilLogger = $DIC->logger()->root();
903 include_once
'./Services/Utilities/classes/class.ilStr.php';
906 $shortened = mb_convert_encoding($shortened,
'UTF-8', $this->
getTargetEncoding());
908 if (strlen($a_value) != strlen($shortened)) {
909 $ilLogger->log(
'Table : ' .
$table);
910 $ilLogger->log(
'Field : ' . $field);
911 $ilLogger->log(
'Type : ' . $this->
fields[$field][
'type']);
912 $ilLogger->log(
'Length : ' . $this->
fields[$field][
'length']);
913 $ilLogger->log(
'Before : ' . $a_value);
914 $ilLogger->log(
'Shortened : ' . $shortened);
915 $ilLogger->log(
'Strlen Before: ' . strlen($a_value));
916 $ilLogger->log(
'Strlen After : ' . strlen($shortened));
static shortenText($a_string, $a_start_pos, $a_num_bytes, $a_encoding='UTF-8')
Shorten text to the given number of bytes.
getTargetEncoding()
Returns the target encoding.
if(empty($password)) $table
◆ $blacklist
ilDBGenerator::$blacklist = array() |
|
protected |
◆ $filter
ilDBGenerator::$filter = array() |
|
protected |
◆ $tables
ilDBGenerator::$tables = array() |
|
protected |
◆ $target_encoding
ilDBGenerator::$target_encoding = 'UTF-8' |
|
protected |
◆ $whitelist
ilDBGenerator::$whitelist = array() |
|
protected |
The documentation for this class was generated from the following file: