ILIAS  release_8 Revision v8.24
ilDataSet Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilDataSet:
+ Collaboration diagram for ilDataSet:

Public Member Functions

 __construct ()
 
 init (string $a_entity, string $a_schema_version)
 Init. More...
 
 getSupportedVersions ()
 
 readData (string $a_entity, string $a_version, array $a_ids)
 Read data from DB. More...
 
 setExportDirectories (string $a_relative, string $a_absolute)
 
 setImportDirectory (string $a_val)
 
 getImportDirectory ()
 
 setDSPrefix (string $a_val)
 
 getDSPrefix ()
 
 getDSPrefixString ()
 
 getDirectDataFromQuery (string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
 Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More...
 
 convertToLeadingUpper (string $a_str)
 Make xyz_abc a XyzAbc string. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, ?array $a_ids, string $a_field="", bool $a_omit_header=false, bool $a_omit_types=false)
 Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text" > <ftype name="field_2" type="date" > <ftype name="field_3" type="integer" > </types> <types ...> ... </types> <set entity="table_name"> <rec> <field_1>content</field_1> <field_2>my_date</field_2> <field_3>my_number</field_3> </rec> ... </set> </dataset> More...
 
 addRecordsXml (ilXmlWriter $a_writer, array $a_prefixes, string $a_entity, string $a_schema_version, array $a_ids, ?string $a_field="")
 
 afterXmlRecordWriting (string $a_entity, string $a_version, array $a_set)
 
 getNamespaces (array &$namespaces, string $a_entity, string $a_schema_version)
 
 getXmlRecord (string $a_entity, string $a_version, array $a_set)
 Get xml record for version. More...
 
 getXmlTypes (string $a_entity, string $a_version)
 Get xml types. More...
 
 getXMLEntityName (string $a_entity, string $a_version)
 Get entity name for xml (may be overwritten) More...
 
 getXMLEntityTag (string $a_entity, string $a_schema_version)
 Get entity tag. More...
 
 setImport (ilSurveyImporter $a_val)
 
 getImport ()
 
 setCurrentInstallationId (string $a_val)
 
 getCurrentInstallationId ()
 
 importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 Needs to be overwritten for import use case. More...
 

Data Fields

const EXPORT_NO_INST_ID = 1
 
const EXPORT_ID_ILIAS_LOCAL = 2
 
const EXPORT_ID_ILIAS_LOCAL_INVALID = 3
 
const EXPORT_ID_ILIAS_REMOTE = 4
 
const EXPORT_ID_ILIAS_REMOTE_INVALID = 5
 
const EXPORT_ID = 6
 
const EXPORT_ID_INVALID = 7
 
int $dircnt = 0
 

Protected Member Functions

 getTypes (string $a_entity, string $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 getXmlNamespace (string $a_entity, string $a_schema_version)
 
 getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
 
 createObjectExportId (string $a_type, string $a_id)
 Build ilias export id. More...
 
 parseObjectExportId (string $a_id, ?string $a_fallback_id=null)
 Parse export id. More...
 
 stripTags (array $rec, array $omit_keys=[])
 

Protected Attributes

string $current_installation_id = ""
 
array $data = []
 
ilDBInterface $db
 
ilLogger $ds_log
 
string $import_directory = ""
 
string $entity = ""
 
string $schema_version = ""
 
string $relative_export_dir = ""
 
string $absolute_export_dir = ""
 
string $ds_prefix = "ds"
 
string $version = ""
 
ilSurveyImporter $import
 

Private Member Functions

 addTypesXml (ilXmlWriter $a_writer, string $a_entity, string $a_schema_version)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning A dataset contains in data in a common structure that can be shared and transformed for different purposes easily, examples

  • transform associative arrays into (set-)xml and back (e.g. for import/export)
  • transform assiciative arrays into json and back (e.g. for ajax requests)

The general structure is:

  • entity name (many times this corresponds to a table name)
  • structure (this is a set of field names and types pairs) currently supported types: text, integer, timestamp planned: date, time, clob types correspond to db types, see http://www.ilias.de/docu/goto.php?target=pg_25354_42&client_id=docu
  • records (similar to records of a database query; associative arrays)
Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 36 of file class.ilDataSet.php.

Constructor & Destructor Documentation

◆ __construct()

ilDataSet::__construct ( )

Reimplemented in ilBibliographicDataSet, ilBlogDataSet, ilDataCollectionDataSet, ilGlossaryDataSet, ilIndividualAssessmentDataSetWrapper, ilLearningModuleDataSet, ilPollDataSet, ilPortfolioDataSet, ilScormAiccDataSet, ilSessionDataSet, ilWikiDataSet, ilMediaObjectDataSet, ilNotesDataSet, ilSkillDataSet, and ilStyleDataSet.

Definition at line 60 of file class.ilDataSet.php.

61 {
62 global $DIC;
63
64 $this->db = $DIC->database();
65 $this->ds_log = ilLoggerFactory::getLogger('ds');
66 }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: feed.php:28

References $DIC, and ilLoggerFactory\getLogger().

+ Here is the call graph for this function:

Member Function Documentation

◆ addRecordsXml()

ilDataSet::addRecordsXml ( ilXmlWriter  $a_writer,
array  $a_prefixes,
string  $a_entity,
string  $a_schema_version,
array  $a_ids,
?string  $a_field = "" 
)

Definition at line 261 of file class.ilDataSet.php.

268 : void {
269 $types = $this->getXmlTypes($a_entity, $a_schema_version);
270
271 $this->ds_log->debug("...read data");
272 $this->readData($a_entity, $a_schema_version, $a_ids);
273 $this->ds_log->debug("...data: " . print_r($this->data, true));
274 foreach ($this->data as $d) {
275 $a_writer->xmlStartTag(
276 $this->getDSPrefixString() . "Rec",
277 array("Entity" => $this->getXMLEntityName($a_entity, $a_schema_version))
278 );
279 $a_writer->xmlStartTag($this->getXMLEntityTag($a_entity, ''));
280 $rec = $this->getXmlRecord($a_entity, $a_schema_version, $d);
281 foreach ($rec as $f => $c) {
282 if ((($types[$f] ?? "") == "directory") && $this->absolute_export_dir !== "" && $this->relative_export_dir !== "") {
283 ilFileUtils::makeDirParents($this->absolute_export_dir . "/dsDir_" . $this->dircnt);
284 $sdir = realpath($c);
285 $tdir = realpath($this->absolute_export_dir . "/dsDir_" . $this->dircnt);
286 try {
287 ilFileUtils::rCopy($sdir, $tdir);
288 } catch (\ILIAS\Filesystem\Exception\FileNotFoundException $e) {
289 $this->ds_log->error($e->getMessage());
290 }
291 $c = $this->relative_export_dir . "/dsDir_" . $this->dircnt;
292 $this->dircnt++;
293 }
294 // this changes schema/dtd
295 //$a_writer->xmlElement($a_prefixes[$a_entity].":".$f,
296 // array(), $c);
297 $a_writer->xmlElement($f, array(), $c);
298 }
299
300 $a_writer->xmlEndTag($this->getXMLEntityTag($a_entity, ''));
301 $a_writer->xmlEndTag($this->getDSPrefixString() . "Rec");
302
303 $this->afterXmlRecordWriting($a_entity, $a_schema_version, $d);
304
305 // foreach record records of dependent entities
306 $this->ds_log->debug("...get dependencies");
307 $deps = $this->getDependencies($a_entity, $a_schema_version, $rec, $a_ids);
308 $this->ds_log->debug("...dependencies: " . print_r($deps, true));
309 foreach ($deps as $dp => $par) {
310 $ids = !is_array($par["ids"])
311 ? [$par["ids"]]
312 : $par["ids"];
313 $this->addRecordsXml($a_writer, $a_prefixes, $dp, $a_schema_version, $ids, $par["field"] ?? null);
314 }
315 }
316 }
getXMLEntityName(string $a_entity, string $a_version)
Get entity name for xml (may be overwritten)
addRecordsXml(ilXmlWriter $a_writer, array $a_prefixes, string $a_entity, string $a_schema_version, array $a_ids, ?string $a_field="")
getXmlTypes(string $a_entity, string $a_version)
Get xml types.
readData(string $a_entity, string $a_version, array $a_ids)
Read data from DB.
getDependencies(string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
getXMLEntityTag(string $a_entity, string $a_schema_version)
Get entity tag.
afterXmlRecordWriting(string $a_entity, string $a_version, array $a_set)
getXmlRecord(string $a_entity, string $a_version, array $a_set)
Get xml record for version.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
$c
Definition: cli.php:38
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
Class ChatMainBarProvider \MainMenu\Provider.

◆ addTypesXml()

ilDataSet::addTypesXml ( ilXmlWriter  $a_writer,
string  $a_entity,
string  $a_schema_version 
)
private

Definition at line 333 of file class.ilDataSet.php.

333 : void
334 {
335 $types = $this->getXmlTypes($a_entity, $a_schema_version);
336
337 // add types of current entity
338 if (count($types) > 0) {
339 $a_writer->xmlStartTag(
340 $this->getDSPrefixString() . "Types",
341 array("Entity" => $this->getXMLEntityName($a_entity, $a_schema_version),
342 "SchemaVersion" => $a_schema_version)
343 );
344 foreach ($this->getXmlTypes($a_entity, $a_schema_version) as $f => $t) {
345 $a_writer->xmlElement(
346 $this->getDSPrefixString() . 'FieldType',
347 array("Name" => $f, "Type" => $t)
348 );
349 }
350 $a_writer->xmlEndTag($this->getDSPrefixString() . "Types");
351 }
352
353 // add types of dependent entities
354 $deps = $this->getDependencies($a_entity, $a_schema_version, null, null);
355 foreach ($deps as $dp => $w) {
356 $this->addTypesXml($a_writer, $dp, $a_schema_version);
357 }
358 }
addTypesXml(ilXmlWriter $a_writer, string $a_entity, string $a_schema_version)

References Vendor\Package\$f, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

+ Here is the call graph for this function:

◆ afterXmlRecordWriting()

ilDataSet::afterXmlRecordWriting ( string  $a_entity,
string  $a_version,
array  $a_set 
)

Reimplemented in ilScorm2004DataSet, and ilUserDataSet.

Definition at line 328 of file class.ilDataSet.php.

328 : void
329 {
330 }

◆ convertToLeadingUpper()

ilDataSet::convertToLeadingUpper ( string  $a_str)

Make xyz_abc a XyzAbc string.

Definition at line 179 of file class.ilDataSet.php.

179 : string
180 {
181 $a_str = strtoupper(substr($a_str, 0, 1)) . substr($a_str, 1);
182 while (($pos = strpos($a_str, "_")) !== false) {
183 $a_str = substr($a_str, 0, $pos) .
184 strtoupper(substr($a_str, $pos + 1, 1)) .
185 substr($a_str, $pos + 2);
186 }
187 return $a_str;
188 }

Referenced by ilUserDataSet\importRecord().

+ Here is the caller graph for this function:

◆ createObjectExportId()

ilDataSet::createObjectExportId ( string  $a_type,
string  $a_id 
)
protected

Build ilias export id.

Definition at line 432 of file class.ilDataSet.php.

432 : string
433 {
434 return "il_" . IL_INST_ID . "_" . $a_type . "_" . $a_id;
435 }
const IL_INST_ID
Definition: constants.php:40

References IL_INST_ID.

◆ getCurrentInstallationId()

ilDataSet::getCurrentInstallationId ( )

Definition at line 424 of file class.ilDataSet.php.

424 : string
425 {
427 }
string $current_installation_id

◆ getDependencies()

◆ getDirectDataFromQuery()

ilDataSet::getDirectDataFromQuery ( string  $a_query,
bool  $a_convert_to_leading_upper = true,
bool  $a_set = true 
)

Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields.

Definition at line 148 of file class.ilDataSet.php.

152 : array {
154
155 $set = $ilDB->query($a_query);
156 $this->data = array();
157 $ret = [];
158 while ($rec = $ilDB->fetchAssoc($set)) {
159 if ($a_convert_to_leading_upper) {
160 $tmp = array();
161 foreach ($rec as $k => $v) {
162 $tmp[$this->convertToLeadingUpper($k)]
163 = $v;
164 }
165 $rec = $tmp;
166 }
167
168 if ($a_set) {
169 $this->data[] = $rec;
170 }
171 $ret[] = $rec;
172 }
173 return $ret;
174 }
convertToLeadingUpper(string $a_str)
Make xyz_abc a XyzAbc string.
ilDBInterface $db

Referenced by ilExerciseDataSet\readData(), ilGlossaryDataSet\readData(), ilHTMLLearningModuleDataSet\readData(), ilItemGroupDataSet\readData(), ilMediaCastDataSet\readData(), ilPollDataSet\readData(), ilPortfolioDataSet\readData(), ilSessionDataSet\readData(), ilSurveyDataSet\readData(), ilWikiDataSet\readData(), ilCalendarDataSet\readData(), ilCOPageDataSet\readData(), ilHelpDataSet\readData(), ilNewsDataSet\readData(), ilRatingDataSet\readData(), ilSkillDataSet\readData(), ilStyleDataSet\readData(), ilTaxonomyDataSet\readData(), and ilUserDataSet\readData().

+ Here is the caller graph for this function:

◆ getDSPrefix()

ilDataSet::getDSPrefix ( )

Definition at line 131 of file class.ilDataSet.php.

131 : string
132 {
133 return $this->ds_prefix;
134 }
string $ds_prefix

References $ds_prefix.

Referenced by getDSPrefixString().

+ Here is the caller graph for this function:

◆ getDSPrefixString()

ilDataSet::getDSPrefixString ( )

Definition at line 136 of file class.ilDataSet.php.

136 : string
137 {
138 if ($this->getDSPrefix() !== "") {
139 return $this->getDSPrefix() . ":";
140 }
141 return "";
142 }

References getDSPrefix().

+ Here is the call graph for this function:

◆ getImport()

ilDataSet::getImport ( )

Definition at line 414 of file class.ilDataSet.php.

415 {
416 return $this->import;
417 }
ilSurveyImporter $import
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getImportDirectory()

ilDataSet::getImportDirectory ( )

Definition at line 121 of file class.ilDataSet.php.

121 : string
122 {
124 }
string $import_directory

References $import_directory.

Referenced by ilUserDataSet\importRecord().

+ Here is the caller graph for this function:

◆ getNamespaces()

ilDataSet::getNamespaces ( array &  $namespaces,
string  $a_entity,
string  $a_schema_version 
)

Definition at line 361 of file class.ilDataSet.php.

361 : void
362 {
363 $ns = $this->getXmlNamespace($a_entity, $a_schema_version);
364 if ($ns !== "") {
365 $namespaces[$a_entity] = $ns;
366 }
367 // add types of dependent entities
368 $deps = $this->getDependencies($a_entity, $a_schema_version, null, null);
369 foreach ($deps as $dp => $w) {
370 $this->getNamespaces($namespaces, $dp, $a_schema_version);
371 }
372 }
getNamespaces(array &$namespaces, string $a_entity, string $a_schema_version)
getXmlNamespace(string $a_entity, string $a_schema_version)

◆ getSupportedVersions()

◆ getTypes()

ilDataSet::getTypes ( string  $a_entity,
string  $a_version 
)
abstractprotected

◆ getXMLEntityName()

ilDataSet::getXMLEntityName ( string  $a_entity,
string  $a_version 
)

Get entity name for xml (may be overwritten)

Definition at line 396 of file class.ilDataSet.php.

396 : string
397 {
398 return $a_entity;
399 }

◆ getXMLEntityTag()

ilDataSet::getXMLEntityTag ( string  $a_entity,
string  $a_schema_version 
)

Get entity tag.

Definition at line 404 of file class.ilDataSet.php.

404 : string
405 {
406 return $this->convertToLeadingUpper($a_entity);
407 }

◆ getXmlNamespace()

◆ getXmlRecord()

ilDataSet::getXmlRecord ( string  $a_entity,
string  $a_version,
array  $a_set 
)

Get xml record for version.

Parameters
array$a_setabstract data record

Reimplemented in ilBlogDataSet, ilExerciseDataSet, ilHTMLLearningModuleDataSet, ilItemGroupDataSet, ilPollDataSet, ilPortfolioDataSet, ilSessionDataSet, ilMediaObjectDataSet, ilStyleDataSet, and ilUserDataSet.

Definition at line 378 of file class.ilDataSet.php.

378 : array
379 {
380 return $a_set;
381 }

◆ getXmlRepresentation()

ilDataSet::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
?array  $a_ids,
string  $a_field = "",
bool  $a_omit_header = false,
bool  $a_omit_types = false 
)
final

Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text" > <ftype name="field_2" type="date" > <ftype name="field_3" type="integer" > </types> <types ...> ... </types> <set entity="table_name"> <rec> <field_1>content</field_1> <field_2>my_date</field_2> <field_3>my_number</field_3> </rec> ... </set> </dataset>

Definition at line 212 of file class.ilDataSet.php.

219 : string {
220 $this->dircnt = 1;
221
222 // init writer
223 $writer = new ilXmlWriter();
224 if (!$a_omit_header) {
225 $writer->xmlHeader();
226 }
227
228 // collect namespaces
229 $namespaces = $prefixes = array();
230 $this->getNamespaces($namespaces, $a_entity, $a_schema_version);
231 $atts = array("InstallationId" => IL_INST_ID,
232 "InstallationUrl" => ILIAS_HTTP_PATH, "TopEntity" => $a_entity);
233 $cnt = 1;
234 foreach ($namespaces as $entity => $ns) {
235 $prefix = "ns" . $cnt;
236 $prefixes[$entity] = $prefix;
237 // $atts["xmlns:".$prefix] = $ns;
238 $cnt++;
239 }
240
241 $this->ds_log->debug("Start writing Dataset, entity: " . $a_entity . ", schema version: " . $a_schema_version .
242 ", ids: " . print_r($a_ids, true));
243 $writer->xmlStartTag($this->getDSPrefixString() . 'DataSet', $atts);
244
245 // add types
246 if (!$a_omit_types) {
247 $this->ds_log->debug("...write types");
248 $this->addTypesXml($writer, $a_entity, $a_schema_version);
249 }
250
251 // add records
252 $this->ds_log->debug("...write records");
253 $this->addRecordsXml($writer, $prefixes, $a_entity, $a_schema_version, $a_ids, $a_field);
254
255 $writer->xmlEndTag($this->getDSPrefixString() . "DataSet");
256
257 return $writer->xmlDumpMem(false);
258 }
string $entity
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getXmlTypes()

ilDataSet::getXmlTypes ( string  $a_entity,
string  $a_version 
)

Get xml types.

Returns
array types array for xml/version set in constructor

Definition at line 387 of file class.ilDataSet.php.

387 : array
388 {
389 return $this->getTypes($a_entity, $a_version);
390 }
getTypes(string $a_entity, string $a_version)
Get (abstract) types for (abstract) field names.

◆ importRecord()

ilDataSet::importRecord ( string  $a_entity,
array  $a_types,
array  $a_rec,
ilImportMapping  $a_mapping,
string  $a_schema_version 
)

◆ init()

ilDataSet::init ( string  $a_entity,
string  $a_schema_version 
)
final

Init.

Parameters
string(abstract) entity name
stringversion string, always the ILIAS release versions that defined the a structure or made changes to it, never use another version. Example: structure is defined in 4.1.0 and changed in 4.3.0 -> use these values only, not 4.2.0 (ask for the 4.1.0 version in ILIAS 4.2.0)

Definition at line 80 of file class.ilDataSet.php.

80 : void
81 {
82 $this->entity = $a_entity;
83 $this->schema_version = $a_schema_version;
84 $this->data = array();
85 }

◆ parseObjectExportId()

ilDataSet::parseObjectExportId ( string  $a_id,
?string  $a_fallback_id = null 
)
protected

Parse export id.

Returns
array type, id

Definition at line 441 of file class.ilDataSet.php.

441 : array
442 {
443 // ilias export id?
444 if (strpos($a_id, "il_") === 0) {
445 $parts = explode("_", $a_id);
446 if (count($parts) !== 4) {
447 throw new ilException("Invalid import ID '" . $a_id . "'.");
448 }
449 $inst_id = $parts[1];
450 $type = $parts[2];
451 $id = $parts[3];
452
453 // missing installation ids?
454 if (($inst_id == 0 || IL_INST_ID === "0") && !DEVMODE) {
455 return array("type" => self::EXPORT_NO_INST_ID, "id" => $a_fallback_id);
456 }
457
458 // same installation?
459 if ($inst_id == IL_INST_ID) {
460 // still existing?
462 return array("type" => self::EXPORT_ID_ILIAS_LOCAL, "id" => $id);
463 }
464 // not found
465 else {
466 return array("type" => self::EXPORT_ID_ILIAS_LOCAL_INVALID, "id" => $a_fallback_id);
467 }
468 }
469 // different installation
470 else {
472 // matching type?
473 if ($id && ilObject::_lookupType($id) === $type) {
474 return array("type" => self::EXPORT_ID_ILIAS_REMOTE, "id" => $id);
475 }
476 // not found
477 else {
478 return array("type" => self::EXPORT_ID_ILIAS_REMOTE_INVALID, "id" => $a_fallback_id);
479 }
480 }
481 } else {
482 // external id
484 if ($id) {
485 return array("type" => self::EXPORT_ID, "id" => $id);
486 } else {
487 return array("type" => self::EXPORT_ID_INVALID, "id" => $a_fallback_id);
488 }
489 }
490 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
static _getIdForImportId(string $import_id)
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
$type

References $id, $parts, $type, ilObject\_getIdForImportId(), ilObject\_lookupType(), and IL_INST_ID.

+ Here is the call graph for this function:

◆ readData()

◆ setCurrentInstallationId()

ilDataSet::setCurrentInstallationId ( string  $a_val)

Definition at line 419 of file class.ilDataSet.php.

419 : void
420 {
421 $this->current_installation_id = $a_val;
422 }

◆ setDSPrefix()

ilDataSet::setDSPrefix ( string  $a_val)

Definition at line 126 of file class.ilDataSet.php.

126 : void
127 {
128 $this->ds_prefix = $a_val;
129 }

◆ setExportDirectories()

ilDataSet::setExportDirectories ( string  $a_relative,
string  $a_absolute 
)

Definition at line 110 of file class.ilDataSet.php.

110 : void
111 {
112 $this->relative_export_dir = $a_relative;
113 $this->absolute_export_dir = $a_absolute;
114 }

◆ setImport()

ilDataSet::setImport ( ilSurveyImporter  $a_val)

Definition at line 409 of file class.ilDataSet.php.

409 : void
410 {
411 $this->import = $a_val;
412 }

◆ setImportDirectory()

ilDataSet::setImportDirectory ( string  $a_val)

Definition at line 116 of file class.ilDataSet.php.

116 : void
117 {
118 $this->import_directory = $a_val;
119 }

◆ stripTags()

ilDataSet::stripTags ( array  $rec,
array  $omit_keys = [] 
)
protected

Definition at line 504 of file class.ilDataSet.php.

504 : array
505 {
506 $ret_rec = [];
507 foreach ($rec as $k => $v) {
508 if (in_array($k, $omit_keys, true)) {
509 $ret_rec[$k] = $v;
510 } else {
511 $ret_rec[$k] = ilUtil::stripSlashes($v);
512 }
513 }
514 return $ret_rec;
515 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References ilUtil\stripSlashes().

Referenced by ilNewsDataSet\importRecord().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $absolute_export_dir

string ilDataSet::$absolute_export_dir = ""
protected

Definition at line 55 of file class.ilDataSet.php.

◆ $current_installation_id

string ilDataSet::$current_installation_id = ""
protected

Definition at line 47 of file class.ilDataSet.php.

◆ $data

array ilDataSet::$data = []
protected

Definition at line 48 of file class.ilDataSet.php.

◆ $db

◆ $dircnt

int ilDataSet::$dircnt = 0

Definition at line 46 of file class.ilDataSet.php.

◆ $ds_log

ilLogger ilDataSet::$ds_log
protected

Definition at line 50 of file class.ilDataSet.php.

◆ $ds_prefix

string ilDataSet::$ds_prefix = "ds"
protected

Definition at line 56 of file class.ilDataSet.php.

Referenced by getDSPrefix().

◆ $entity

string ilDataSet::$entity = ""
protected

◆ $import

ilSurveyImporter ilDataSet::$import
protected

Definition at line 58 of file class.ilDataSet.php.

◆ $import_directory

string ilDataSet::$import_directory = ""
protected

Definition at line 51 of file class.ilDataSet.php.

Referenced by getImportDirectory().

◆ $relative_export_dir

string ilDataSet::$relative_export_dir = ""
protected

Definition at line 54 of file class.ilDataSet.php.

◆ $schema_version

string ilDataSet::$schema_version = ""
protected

Definition at line 53 of file class.ilDataSet.php.

◆ $version

string ilDataSet::$version = ""
protected

◆ EXPORT_ID

const ilDataSet::EXPORT_ID = 6

Definition at line 43 of file class.ilDataSet.php.

◆ EXPORT_ID_ILIAS_LOCAL

const ilDataSet::EXPORT_ID_ILIAS_LOCAL = 2

Definition at line 39 of file class.ilDataSet.php.

◆ EXPORT_ID_ILIAS_LOCAL_INVALID

const ilDataSet::EXPORT_ID_ILIAS_LOCAL_INVALID = 3

Definition at line 40 of file class.ilDataSet.php.

◆ EXPORT_ID_ILIAS_REMOTE

const ilDataSet::EXPORT_ID_ILIAS_REMOTE = 4

Definition at line 41 of file class.ilDataSet.php.

◆ EXPORT_ID_ILIAS_REMOTE_INVALID

const ilDataSet::EXPORT_ID_ILIAS_REMOTE_INVALID = 5

Definition at line 42 of file class.ilDataSet.php.

◆ EXPORT_ID_INVALID

const ilDataSet::EXPORT_ID_INVALID = 7

Definition at line 44 of file class.ilDataSet.php.

◆ EXPORT_NO_INST_ID

const ilDataSet::EXPORT_NO_INST_ID = 1

Definition at line 38 of file class.ilDataSet.php.


The documentation for this class was generated from the following file: