Export class for content objects.
More...
Export class for content objects.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 35 of file class.ilGlossaryExport.php.
◆ __construct()
ilGlossaryExport::__construct |
( |
& |
$a_glo_obj, |
|
|
|
$a_mode = "xml" |
|
) |
| |
Constructor public.
Definition at line 47 of file class.ilGlossaryExport.php.
References $ilDB, $ilErr, $ilias, and time.
51 $this->glo_obj = $a_glo_obj;
56 $this->mode = $a_mode;
58 $settings = $this->
ilias->getAllSettings();
60 $this->inst_id = $settings[
"inst_id"] ? $settings[
'inst_id'] : 0;
66 $this->export_dir = $this->glo_obj->getExportDirectory();
67 $this->subdir = $date.
"__".$this->inst_id.
"__".
68 $this->glo_obj->getType().
"_".$this->glo_obj->getId();
69 $this->filename = $this->subdir.
".xml";
73 $this->export_dir = $this->glo_obj->getExportDirectory(
"html");
74 $this->subdir = $this->glo_obj->getType().
"_".$this->glo_obj->getId();
75 $this->filename = $this->subdir.
".zip";
redirection script todo: (a better solution should control the processing via a xml file) ...
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ buildExportFile()
ilGlossaryExport::buildExportFile |
( |
| ) |
|
◆ buildExportFileHTML()
ilGlossaryExport::buildExportFileHTML |
( |
| ) |
|
build html export file
Definition at line 182 of file class.ilGlossaryExport.php.
References $ilBench.
Referenced by buildExportFile().
187 $this->glo_obj->createExportDirectory(
"html");
190 $expDir = $this->glo_obj->getExportDirectory();
193 $this->glo_obj->exportHTML($this->export_dir.
"/".$this->subdir, $expLog);
◆ buildExportFileXML()
ilGlossaryExport::buildExportFileXML |
( |
| ) |
|
build export file (complete zip file)
Definition at line 110 of file class.ilGlossaryExport.php.
References $ilBench, date, ilUtil\makeDir(), ilXmlWriter\xmlSetDtdDef(), and ilUtil\zip().
Referenced by buildExportFile().
114 $ilBench->start(
"GlossaryExport",
"buildExportFile");
116 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
121 $this->xml->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.uni-koeln.de/download/dtd/ilias_co_3_7.dtd\">");
124 $this->xml->xmlSetGenCmt(
"Export of ILIAS Glossary ".
125 $this->glo_obj->getId().
" of installation ".$this->inst.
".");
128 $this->xml->xmlHeader();
131 $this->glo_obj->createExportDirectory();
136 $expDir = $this->glo_obj->getExportDirectory();
137 include_once
'./Services/Logging/classes/class.ilLog.php';
138 $expLog =
new ilLog($expDir,
"export.log");
140 $expLog->setLogFormat(
"");
141 $expLog->write(
date(
"[y-m-d H:i:s] ").
"Start Export");
145 $ilBench->start(
"GlossaryExport",
"buildExportFile_getXML");
146 $this->glo_obj->exportXML($this->xml, $this->inst_id,
147 $this->export_dir.
"/".$this->subdir, $expLog);
148 $ilBench->stop(
"GlossaryExport",
"buildExportFile_getXML");
159 $ilBench->start(
"GlossaryExport",
"buildExportFile_dumpToFile");
160 $this->xml->xmlDumpFile($this->export_dir.
"/".$this->subdir.
"/".$this->filename
162 $ilBench->stop(
"GlossaryExport",
"buildExportFile_dumpToFile");
165 $ilBench->start(
"GlossaryExport",
"buildExportFile_zipFile");
167 $this->export_dir.
"/".$this->subdir.
".zip");
168 $ilBench->stop(
"GlossaryExport",
"buildExportFile_zipFile");
171 $this->xml->_XmlWriter;
173 $expLog->write(
date(
"[y-m-d H:i:s] ").
"Finished Export");
174 $ilBench->stop(
"GlossaryExport",
"buildExportFile");
176 return $this->export_dir.
"/".$this->subdir.
".zip";
xmlSetDtdDef($dtdDef)
Sets dtd definition.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
◆ getInstId()
ilGlossaryExport::getInstId |
( |
| ) |
|
◆ $db
◆ $err
◆ $glo_obj
ilGlossaryExport::$glo_obj |
◆ $ilias
◆ $inst_id
ilGlossaryExport::$inst_id |
The documentation for this class was generated from the following file: